method

to_h

v2_4_6 - Show latest stable - Class: Array
to_h()
public

Returns the result of interpreting ary as an array of [key, value] pairs.

[[:foo, :bar], [1, 2]].to_h
  # => {:foo => :bar, 1 => 2}