Class: OpenStruct

Inherits:
Object
  • Object
show all
Defined in:
lib/zenaton/refinements/open_struct.rb

Overview

Reimplements ‘json/add/ostruct`

Class Method Summary collapse

Class Method Details

.from_zenaton(props) ⇒ Object

Parse from simple hash



25
26
27
# File 'lib/zenaton/refinements/open_struct.rb', line 25

def self.from_zenaton(props)
  new(props['t'] || props[:t])
end