Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/overrides/hash.rb

Overview

Convert Hash to OpenStruct recursively

Instance Method Summary collapse

Instance Method Details

#to_oObject



3
4
5
# File 'lib/overrides/hash.rb', line 3

def to_o
  JSON.parse to_json, object_class: OpenStruct
end