るりまサーチ

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.064秒)
トップページ > クエリ:-[x] > クエリ:Raise[x] > クエリ:map[x] > クラス:Object[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

Object#enum_for(method = :each, *args) -> Enumerator (113.0)

Enumerator.new(self, method, *args) を返します。

...r(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise
ArgumentError, "#{n} is...

Object#enum_for(method = :each, *args) {|*args| ... } -> Enumerator (113.0)

Enumerator.new(self, method, *args) を返します。

...r(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise
ArgumentError, "#{n} is...

Object#to_enum(method = :each, *args) -> Enumerator (113.0)

Enumerator.new(self, method, *args) を返します。

...r(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise
ArgumentError, "#{n} is...

Object#to_enum(method = :each, *args) {|*args| ... } -> Enumerator (113.0)

Enumerator.new(self, method, *args) を返します。

...r(:each_byte)
p(a = enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise
ArgumentError, "#{n} is...