るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.165秒)
トップページ > 種類:インスタンスメソッド[x] > クエリ:t[x] > クエリ:ruby[x] > クエリ:string[x] > クラス:Enumerator[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

検索結果

Enumerator#with_object(obj) -> Enumerator (6132.0)

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

...bj を返す Enumerator を返します。

//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
t
o_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end

t
o_three_with_string = to_three.with_object("foo")
t
o_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end...
...# => foo:0
# => foo:1
# => foo:2
//}

@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object...

Enumerator#with_object(obj) {|(*args), memo_obj| ... } -> object (6132.0)

繰り返しの各要素に obj を添えてブロックを繰り返し、obj を返り値として返します。

...bj を返す Enumerator を返します。

//emlist[例][ruby]{
# 0,1,2 と呼びだす enumeratorを作る
t
o_three = Enumerator.new do |y|
3.times do |x|
y << x
end
end

t
o_three_with_string = to_three.with_object("foo")
t
o_three_with_string.each do |x,string|
puts "#{string}: #{x}"
end...
...# => foo:0
# => foo:1
# => foo:2
//}

@param obj 繰り返しの各要素に添えて渡されるオブジェクト
@see Enumerable#each_with_object...