Methods
to_h to_h_assoc to_h_auto to_h_flat to_h_multi to_h_splat
Public Instance methods
to_h(mode=nil)

Convert an Enumerator object into a hash. This is equivalent to Array#to_h.

  e1 = [[1,:a],[2,:b],[3,:c]].to_enum
  e1.to_h #=> { 1=>:a, 2=>:b, 3=>:c }

  e2 = [1,2,3,4,5].to_enum
  e2.to_h  #=> {5=>nil, 1=>2, 3=>4}

  e3 = [1,2,1,3,1,5].to_enum
  e3.to_h #=> {1=>5}

CREDIT: Sandor Szücs

# File lib/core/facets/to_hash.rb, line 342
    def to_h(mode=nil)
      to_a.to_h(mode)
    end
to_h_assoc()

This is equivalent to Array#to_h_assoc.

# File lib/core/facets/to_hash.rb, line 366
    def to_h_assoc
      to_a.to_h_assoc
    end
to_h_auto()

This is equivalent to Array#to_h_auto.

# File lib/core/facets/to_hash.rb, line 348
    def to_h_auto
      to_a.to_h_auto
    end
to_h_flat()

This is equivalent to Array#to_h_flat.

# File lib/core/facets/to_hash.rb, line 360
    def to_h_flat
      to_a.to_h_flat
    end
to_h_multi()

This is equivalent to Array#to_h_multi.

# File lib/core/facets/to_hash.rb, line 372
    def to_h_multi
      to_a.to_h_multi
    end
to_h_splat()

This is equivalent to Array#to_h_splat.

# File lib/core/facets/to_hash.rb, line 354
    def to_h_splat
      to_a.to_h_splat
    end