るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.045秒)

別のキーワード

  1. _builtin %
  2. bigdecimal %
  3. range %
  4. float %
  5. numeric %

ライブラリ

クラス

検索結果

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

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

...メータは引数 args です。


@param method メソッド名の文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。

//emlist[][ruby]{
str = "xyz"

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

# protects...
...ば size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end

%
i[hello world].repeat(2) { |w| puts w }
# => 'hello', 'hello', 'world', 'world'
enum = (1..14).repeat(3)
# => #<Enumerator: 1..14:repeat(3)>
enum.fir...

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

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

...メータは引数 args です。


@param method メソッド名の文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。

//emlist[][ruby]{
str = "xyz"

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

# protects...
...ば size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end

%
i[hello world].repeat(2) { |w| puts w }
# => 'hello', 'hello', 'world', 'world'
enum = (1..14).repeat(3)
# => #<Enumerator: 1..14:repeat(3)>
enum.fir...

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

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

...メータは引数 args です。


@param method メソッド名の文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。

//emlist[][ruby]{
str = "xyz"

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

# protects...
...ば size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end

%
i[hello world].repeat(2) { |w| puts w }
# => 'hello', 'hello', 'world', 'world'
enum = (1..14).repeat(3)
# => #<Enumerator: 1..14:repeat(3)>
enum.fir...

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

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

...メータは引数 args です。


@param method メソッド名の文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。

//emlist[][ruby]{
str = "xyz"

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

# protects...
...ば size * n を返す。
sz = size
sz * n if sz
end
end
each do |*val|
n.times { yield *val }
end
end
end

%
i[hello world].repeat(2) { |w| puts w }
# => 'hello', 'hello', 'world', 'world'
enum = (1..14).repeat(3)
# => #<Enumerator: 1..14:repeat(3)>
enum.fir...