るりまサーチ

最速Rubyリファレンスマニュアル検索!
940件ヒット [101-200件を表示] (0.027秒)
トップページ > クエリ:on[x] > クエリ:each[x]

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception
  5. thread abort_on_exception=

モジュール

検索結果

<< < 1 2 3 4 ... > >>

OpenSSL::Config#each {|section, key, value| ... } -> self (21207.0)

オブジェクトに含まれる全ての設定情報を順にブロックに渡し 呼び出します。

...列、キーに
割り当てられた値の文字列、の3つです。

require 'openssl'
conf = OpenSSL::Config.load(OpenSSL::Config::DEFAULT_CONFIG_FILE)
conf.each{|section, key, value| p [section, key, value]}
# => ["req_distinguished_name", "countryName", "Country Name (2 letter code)"]...

GetoptLong#each {|optname, optarg|...} (21102.0)

get メソッドのイテレータ版です。オプションとその引数の取得を 繰り返し行います。

...get メソッドのイテレータ版です。オプションとその引数の取得を
繰り返し行います。

@see GetoptLong#get...

Gem::ConfigFile#each {|key, value| ... } -> Hash (21101.0)

設定ファイルの各項目のキーと値をブロック引数として与えられたブロックを評価します。

設定ファイルの各項目のキーと値をブロック引数として与えられたブロックを評価します。

OpenSSL::ASN1::Constructive#each {|item| ... } -> self (21101.0)

構造型のデータに含まれる各要素に対してブロックを 評価します。

構造型のデータに含まれる各要素に対してブロックを
評価します。

Shell::Concat#each(rs = nil) {|job| ... } (21101.0)

@todo

@todo

絞り込み条件を変える

WEBrick::HTTPResponse#each {|key, val| ... } (21101.0)

レスポンスのヘッダ名を key、内容を val としてブロックを評価します。

レスポンスのヘッダ名を key、内容を val としてブロックを評価します。

TSort.strongly_connected_components(each_node, each_child) -> Array (18598.0)

強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。

...結成分を表す配列です。

引数 each_node と each_child でグラフを表します。

@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。

@param each_child 引数で与えられた頂点の...
...[]}
each
_node = lambda {|&b| g.each_key(&b) }
each
_child = lambda {|n, &b| g[n].each(&b) }
p TSort.strongly_connected_components(each_node, each_child)
# => [[4], [2], [3], [1]]

g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each
_node = lambda {|&b| g.each_key(&b) }
each
_child = lambda {|n, &b| g[n].each(&...
...b) }
p TSort.strongly_connected_components(each_node, each_child)
# => [[4], [2, 3], [1]]
//}

@see TSort#strongly_connected_components...

TSort#strongly_connected_components -> Array (18324.0)

強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。

...rt'

class Hash
include TSort
alias tsort_each_node each_key
def tsort_each_child(node, &block)
fetch(node).each(&block)
end
end

non_sort = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}

p non_sort.strongly_connected_components
#=> [[4], [2, 3], [1]]
//}

@see TSort.strongly_connected_components...

IO#each(limit, chomp: false) -> Enumerator (18166.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区...
...testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
//emlis...
...uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}

@see $/, IO#gets...

IO#each(limit, chomp: false) {|line| ... } -> self (18166.0)

IO の現在位置から 1 行ずつ文字列として読み込み、それを引数として 与えられたブロックを実行します。

...IO.write("testfile", "This is line one,\nThis is line two,\nThis is line three,\nAnd so on...")
f = File.new("testfile")
f.each { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one,\n"
# "2: This is line two,\n"
# "3: This is line three,\n"
# "4: And so on..."
//}
//emlist[例: 行の区...
...testfile", "This is line one,This is line two,This is line three,And so on...")
f = File.new("testfile")
f.each(",", 10) { |line| p "#{f.lineno}: #{line}" }
# => "0: This is li"
# "1: ne one,"
# "1: This is li"
# "2: ne two,"
# "2: This is li"
# "3: ne three,"
# "3: And so on."
# "4: .."
//}
//emlis...
...uby]{
IO.write("testfile", "This is line one\nThis is line two\nThis is line three\nAnd so on...")
f = File.new("testfile")
f.each(chomp: true) { |line| p "#{f.lineno}: #{line}" }
# => "1: This is line one"
# "2: This is line two"
# "3: This is line three"
# "4: And so on..."
//}

@see $/, IO#gets...

絞り込み条件を変える

<< < 1 2 3 4 ... > >>