438件ヒット
[401-438件を表示]
(0.044秒)
別のキーワード
種類
- インスタンスメソッド (300)
- 特異メソッド (66)
- クラス (48)
- ライブラリ (24)
ライブラリ
- ビルトイン (6)
-
rubygems
/ remote _ fetcher (216) -
rubygems
/ spec _ fetcher (168) -
rubygems
/ test _ utilities (24)
クラス
- Data (6)
-
Gem
:: RemoteFetcher (180) -
Gem
:: RemoteFetcher :: FetchError (24) -
Gem
:: SpecFetcher (156)
キーワード
- FakeFetcher (12)
- FetchError (12)
- RemoteFetcher (12)
- SpecFetcher (12)
-
cache
_ dir (12) -
connection
_ for (12) - define (6)
- dir (12)
- download (12)
- escape (12)
- fetch (12)
-
fetch
_ path (12) -
fetch
_ size (12) -
fetch
_ spec (12) - fetcher= (24)
-
file
_ uri? (12) -
find
_ matching (12) -
get
_ file _ uri _ path (12) -
get
_ proxy _ from _ env (12) -
latest
_ specs (12) -
legacy
_ repos (12) - list (12)
-
load
_ specs (12) - new (12)
-
normalize
_ uri (12) -
open
_ uri _ or _ path (12) - request (12)
- reset (12)
-
rubygems
/ remote _ fetcher (12) -
rubygems
/ spec _ fetcher (12) - specs (12)
- unescape (12)
- uri (12)
-
warn
_ legacy (12)
検索結果
先頭5件
-
Gem
:: SpecFetcher # list(all = false) -> Array (6000.0) -
Gem::sources に格納されている各ソースから利用可能な Gem のリストを取得して返します。
...
Gem::sources に格納されている各ソースから利用可能な Gem のリストを取得して返します。
@param list 真を指定すると全てのバージョンの情報を返します。... -
Gem
:: SpecFetcher # load _ specs(source _ uri , file) -> object (6000.0) -
指定された source_uri, file から gemspec をロードします。
...指定された source_uri, file から gemspec をロードします。
また、内部ではキャッシュの更新も行っています。
@param source_uri gemspec の置いてある URI を指定します。
@param file gemspec のファイル名を指定します。... -
Gem
:: SpecFetcher # specs -> Hash (6000.0) -
キャッシュされている全ての gemspec を返します。
...キャッシュされている全ての gemspec を返します。... -
Data
. define(*args) -> Class (112.0) -
Data クラスに新しいサブクラスを作って、それを返します。
...//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}
メンバの値を書き換えることはできません。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
fred.age = 6 # => NoMethodError......lass HTTPFetcher
Response = Data.define(:body)
NotFound = Data.define
def get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end
def fetch(url)
fetcher = HTTPFetcher.new
c......ase fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::NotFound
:NotFound
end
end
p fetch("http://example.com/") # => "Current time is 2023-01-10 10:00:53 +0900"
p fetch("http://example.com/404") # => :NotFound
//}
@param args 値オブジェクトのクラス... -
Data
. define(*args) {|subclass| block } -> Class (112.0) -
Data クラスに新しいサブクラスを作って、それを返します。
...//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
p fred.name # => "Fred"
p fred.age # => 5
//}
メンバの値を書き換えることはできません。
//emlist[例][ruby]{
Dog = Data.define(:name, :age)
fred = Dog.new("Fred", 5)
fred.age = 6 # => NoMethodError......lass HTTPFetcher
Response = Data.define(:body)
NotFound = Data.define
def get(url)
# ダミーの実装
if url == "http://example.com/"
Response.new(body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end
def fetch(url)
fetcher = HTTPFetcher.new
c......ase fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::NotFound
:NotFound
end
end
p fetch("http://example.com/") # => "Current time is 2023-01-10 10:00:53 +0900"
p fetch("http://example.com/404") # => :NotFound
//}
@param args 値オブジェクトのクラス...