ライブラリ
- ビルトイン (341)
- matrix (66)
- mkmf (66)
-
net
/ http (11) - pathname (22)
- rake (11)
-
rdoc
/ context (55) -
rdoc
/ top _ level (22) -
rexml
/ document (11) -
rubygems
/ command _ manager (22) -
rubygems
/ commands / dependency _ command (22) -
rubygems
/ commands / which _ command (11) -
rubygems
/ dependency _ installer (22) -
rubygems
/ dependency _ list (11) -
rubygems
/ gem _ path _ searcher (22) -
rubygems
/ source _ index (11) -
rubygems
/ spec _ fetcher (11) - shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - socket (22)
- uri (11)
クラス
- Array (125)
- BasicObject (11)
-
Enumerator
:: Lazy (28) -
Gem
:: CommandManager (22) -
Gem
:: Commands :: DependencyCommand (22) -
Gem
:: Commands :: WhichCommand (11) -
Gem
:: DependencyInstaller (22) -
Gem
:: DependencyList (11) -
Gem
:: GemPathSearcher (22) -
Gem
:: SourceIndex (11) -
Gem
:: SpecFetcher (11) - Matrix (66)
-
Net
:: HTTP (11) - Pathname (22)
-
RDoc
:: Context (55) -
RDoc
:: TopLevel (22) - Range (22)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) -
Socket
:: AncillaryData (11) -
Socket
:: Ifaddr (11) - String (11)
-
URI
:: Generic (11)
モジュール
- Enumerable (144)
- Kernel (77)
-
REXML
:: Node (11)
キーワード
- bsearch (44)
-
bsearch
_ index (18) - detect (22)
- filter (18)
-
find
_ all (44) -
find
_ command (11) -
find
_ command _ possibilities (11) -
find
_ enclosing _ module _ named (11) -
find
_ executable (11) -
find
_ first _ recursive (11) -
find
_ gems (11) -
find
_ gems _ with _ sources (11) -
find
_ header (11) -
find
_ index (99) -
find
_ library (22) -
find
_ local _ symbol (22) -
find
_ matching (11) -
find
_ module _ named (22) -
find
_ name (22) -
find
_ paths (11) -
find
_ proxy (11) -
find
_ reverse _ dependencies (11) -
find
_ spec _ by _ name _ and _ version (11) -
find
_ symbol (11) -
find
_ system _ command (18) -
find
_ type (22) - ifindex (11)
- index (66)
-
ipv6
_ pktinfo _ ifindex (11) - lazy (11)
-
method
_ missing (11) - namespace (11)
- pack (19)
- propfind (11)
-
record
_ location (11) - select (33)
- unpack (11)
検索結果
先頭5件
-
Enumerator
:: Lazy # filter {|item| . . . } -> Enumerator :: Lazy (27.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...ror ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//... -
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (27.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...ror ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i| i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//... -
Array
# bsearch _ index -> Enumerator (25.0) -
ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を 二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返します。self はあらかじめソートしておく必要があります。
...さい。
//emlist[例: find-minimum モード][ruby]{
ary = [0, 4, 7, 10, 12]
ary.bsearch_index { |x| x >= 4 } # => 1
ary.bsearch_index { |x| x >= 6 } # => 2
ary.bsearch_index { |x| x >= -1 } # => 0
ary.bsearch_index { |x| x >= 100 } # => nil
//}
//emlist[例: find-any モード][ruby]{
ary... -
Array
# bsearch _ index { |x| . . . } -> Integer | nil (25.0) -
ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を 二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返します。self はあらかじめソートしておく必要があります。
...さい。
//emlist[例: find-minimum モード][ruby]{
ary = [0, 4, 7, 10, 12]
ary.bsearch_index { |x| x >= 4 } # => 1
ary.bsearch_index { |x| x >= 6 } # => 2
ary.bsearch_index { |x| x >= -1 } # => 0
ary.bsearch_index { |x| x >= 100 } # => nil
//}
//emlist[例: find-any モード][ruby]{
ary... -
Array
# pack(template) -> String (13.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...emlist[][ruby]{
require 'socket'
official_hostname, alias_hostnames, address_family, *address_list = Socket.gethostbyname("localhost")
address_list.find {|address| address.size == 4 }.unpack("C4").join(".")
# => "127.0.0.1"
"127.0.0.1".split(".").collect {|c| c.to_i}.pack("C4")
# => "\x7F\x00\x00\x... -
Array
# pack(template , buffer: String . new) -> String (13.0) -
配列の内容を template で指定された文字列にしたがって、 バイナリとしてパックした文字列を返します。
...emlist[][ruby]{
require 'socket'
official_hostname, alias_hostnames, address_family, *address_list = Socket.gethostbyname("localhost")
address_list.find {|address| address.size == 4 }.unpack("C4").join(".")
# => "127.0.0.1"
"127.0.0.1".split(".").collect {|c| c.to_i}.pack("C4")
# => "\x7F\x00\x00\x... -
BasicObject
# method _ missing(name , *args) -> object (13.0) -
呼びだされたメソッドが定義されていなかった時、Rubyインタプリタがこのメソッド を呼び出します。
...ng)
if name.to_s =~ /\Afind_(\d+)_in\z/
if @data[lang]
p @data[lang][$1.to_i]
else
raise "#{lang} unknown"
end
else
super
end
end
end
dic = Foo.new({:English => %w(zero one two), :Esperanto => %w(nulo unu du)})
dic.find_2_in :Esperanto #=> "du"... -
Enumerable
# lazy -> Enumerator :: Lazy (13.0) -
自身を lazy な Enumerator に変換したものを返します。
...(つまり、配列ではな
くEnumeratorを返す) ように再定義されています。
* map/collect
* flat_map/collect_concat
* select/find_all
* reject
* grep
* take, take_while
* drop, drop_while
* zip (※一貫性のため、ブロックを渡さないケースのみlazy)
* cyc... -
Kernel
# namespace(name = nil) { . . . } -> Rake :: NameSpace (13.0) -
新しい名前空間を作成します。
...新しい名前空間を作成します。
与えられたブロックを評価する間は、その名前空間を使用します。
例:
ns = namespace "nested" do
task :run
end
task_run = ns[:run] # find :run in the given namespace.
@see Rake::TaskManager#in_namespace... -
String
# unpack(template) -> Array (13.0) -
Array#pack で生成された文字列を テンプレート文字列 template にしたがってアンパックし、 それらの要素を含む配列を返します。
...emlist[][ruby]{
require 'socket'
official_hostname, alias_hostnames, address_family, *address_list = Socket.gethostbyname("localhost")
address_list.find {|address| address.size == 4 }.unpack("C4").join(".")
# => "127.0.0.1"
"127.0.0.1".split(".").collect {|c| c.to_i}.pack("C4")
# => "\x7F\x00\x00\x...