module Haml::Util
def to_hash(arr)
-
(Hash)
- A hash
Parameters:
-
arr
(Array<(Object, Object)>
) -- An array of pairs
def to_hash(arr) arr.compact.inject({}) {|h, (k, v)| h[k] = v; h} end
(Hash)
- A hash
arr
(Array<(Object, Object)>
)
-- An array of pairs
def to_hash(arr) arr.compact.inject({}) {|h, (k, v)| h[k] = v; h} end