Method: JSOS#initialize
- Defined in:
- lib/jsos.rb
#initialize(state = nil) ⇒ JSOS
Returns a new instance of JSOS.
44 45 46 47 48 |
# File 'lib/jsos.rb', line 44 def initialize(state = nil) return super if state.nil? state_hash = state.is_a?(String) ? JSON.parse(state) : state super parse_state_hash(state_hash) end |