種類
- インスタンスメソッド (88)
- 文書 (11)
- クラス (11)
ライブラリ
- ビルトイン (99)
クラス
-
Enumerator
:: Lazy (44) - Object (44)
キーワード
- Enumerator (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
to
_ enum (44)
検索結果
先頭5件
- Object
# enum _ for(method = :each , *args) -> Enumerator - Object
# enum _ for(method = :each , *args) {|*args| . . . } -> Enumerator - Enumerator
:: Lazy # enum _ for(method = :each , *args) -> Enumerator :: Lazy - Enumerator
:: Lazy # enum _ for(method = :each , *args) {|*args| block} -> Enumerator :: Lazy - Object
# to _ enum(method = :each , *args) -> Enumerator
-
Object
# enum _ for(method = :each , *args) -> Enumerator (27108.0) -
Enumerator.new(self, method, *args) を返します。
...文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(: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) #=> #<Enume... -
Object
# enum _ for(method = :each , *args) {|*args| . . . } -> Enumerator (27108.0) -
Enumerator.new(self, method, *args) を返します。
...文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(: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) #=> #<Enume... -
Enumerator
:: Lazy # enum _ for(method = :each , *args) -> Enumerator :: Lazy (18118.0) -
Object#to_enum と同じですが、Enumerator::Lazy を返します。
...
Object#to_enum と同じですが、Enumerator::Lazy を返します。
to_enum は「ブロック付きで呼ぶとループを実行し、ブロックを省略した場合は
Enumerator を返す」ようなメソッドを定義するときによく使われます。
このときに lazy 性が... -
Enumerator
:: Lazy # enum _ for(method = :each , *args) {|*args| block} -> Enumerator :: Lazy (18118.0) -
Object#to_enum と同じですが、Enumerator::Lazy を返します。
...
Object#to_enum と同じですが、Enumerator::Lazy を返します。
to_enum は「ブロック付きで呼ぶとループを実行し、ブロックを省略した場合は
Enumerator を返す」ようなメソッドを定義するときによく使われます。
このときに lazy 性が... -
Object
# to _ enum(method = :each , *args) -> Enumerator (12008.0) -
Enumerator.new(self, method, *args) を返します。
...文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(: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) #=> #<Enume... -
Object
# to _ enum(method = :each , *args) {|*args| . . . } -> Enumerator (12008.0) -
Enumerator.new(self, method, *args) を返します。
...文字列かシンボルです。
@param args 呼び出すメソッドに渡される引数です。
//emlist[][ruby]{
str = "xyz"
enum = str.enum_for(: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) #=> #<Enume... -
Enumerator
:: Lazy # to _ enum(method = :each , *args) -> Enumerator :: Lazy (3018.0) -
Object#to_enum と同じですが、Enumerator::Lazy を返します。
...
Object#to_enum と同じですが、Enumerator::Lazy を返します。
to_enum は「ブロック付きで呼ぶとループを実行し、ブロックを省略した場合は
Enumerator を返す」ようなメソッドを定義するときによく使われます。
このときに lazy 性が... -
Enumerator
:: Lazy # to _ enum(method = :each , *args) {|*args| block} -> Enumerator :: Lazy (3018.0) -
Object#to_enum と同じですが、Enumerator::Lazy を返します。
...
Object#to_enum と同じですが、Enumerator::Lazy を返します。
to_enum は「ブロック付きで呼ぶとループを実行し、ブロックを省略した場合は
Enumerator を返す」ようなメソッドを定義するときによく使われます。
このときに lazy 性が... -
NEWS for Ruby 2
. 0 . 0 (48.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...* 拡張: Kernel.#caller 第2引数で取得するスタックのサイズを指定できるようになりました
* 拡張: Object#to_enum Object#enum_for サイズの遅延評価のためにブロックを受け取るようになりました
* 非互換: Kernel.#system, Kernel.#exec......ジナルの振舞いに戻りました。定義したときの名前ではなく呼び出したときの名前を返します。
* 非互換: Object#inspect は #to_s を呼び出さなくなりました。再定義された #to_s を呼び出すためです。
* LoadError
* 追加: Load......になりました
* 拡張: Module#const_get 修飾された定数名の文字列を受け付けるようになりました。
//emlist{
Object.const_get("Foo::Bar::Baz")
//}
* Mutex
* 追加(実験的): Mutex#owned? mutex が現在のスレッドに所持されているかどう... -
Enumerator (18.0)
-
each 以外のメソッドにも Enumerable の機能を提供するためのラッパークラスです。 また、外部イテレータとしても使えます。
...いても each と同様に Enumerable の機能を利用できます。
Enumerator を生成するには Enumerator.newあるいは
Object#to_enum, Object#enum_for を利用します。また、一部の
イテレータはブロックを渡さずに呼び出すと繰り返しを実行する代わ...