Module: Enumerable

Included in:
Immutable::Enumerable
Defined in:
lib/immutable/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 Immutable::List populated with the items in this ‘Enumerable` object.

Returns:

  • (List)


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

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