Module: Enumerable

Included in:
Hamster::Enumerable
Defined in:
lib/hamster/core_ext/enumerable.rb

Overview

Monkey-patches to Ruby's built-in Enumerable module.

Instance Method Summary collapse

Instance Method Details

#to_listList

Return a new Hamster::List populated with the items in this Enumerable object.

Returns:

  • (List)

8
9
10
# File 'lib/hamster/core_ext/enumerable.rb', line 8

def to_list
  Hamster::List.from_enum(self)
end