Class: Hash
Instance Method Summary collapse
Instance Method Details
#to_deep_struct ⇒ Object
36 37 38 |
# File 'lib/dorian/to_struct.rb', line 36 def to_deep_struct Struct.new(*keys.map(&:to_sym)).new(*values.map(&:to_deep_struct)) end |
#to_struct ⇒ Object
32 33 34 |
# File 'lib/dorian/to_struct.rb', line 32 def to_struct Struct.new(*keys.map(&:to_sym)).new(*values) end |