Lua::Table
Inherits Enumerable < Lua::Base < Reference < Object
Instance methods
[](index : Any::Type) : Any | Nil
Source[]=(index : Any::Type, value : Any::Type) : Any::Type
Sourceto_h
Creates a Hash out of an Enumerable where each element is a
2 element structure (for instance a Tuple or an Array).
[[:a, :b], [:c, :d]].to_h # => {:a => :b, :c => :d}
Tuple.new({:a, 1}, {:c, 2}).to_h # => {:a => 1, :c => 2}