Flowdock
method

new

Importance_1
v1_8_6_287 - Show latest stable - 0 notes - Class: Enumerable::Enumerator
new(...) public

Creates a new Enumerable::Enumerator object, which is to be used as an Enumerable object using the given object’s given method with the given arguments.

e.g.:

    str = "xyz"

    enum = Enumerable::Enumerator.new(str, :each_byte)
    a = enum.map {|b| '%02x' % b } #=> ["78", "79", "7a"]
Show source
Register or log in to add new notes.