Class: ButterCMS::HashToObject

Inherits:
Object
  • Object
show all
Defined in:
lib/buttercms/hash_to_object.rb

Class Method Summary collapse

Class Method Details

.convert(hash) ⇒ Object



3
4
5
# File 'lib/buttercms/hash_to_object.rb', line 3

def self.convert(hash)
  JSON.parse(hash.to_json, object_class: OpenStruct, quirks_mode: true)
end