Module: Jsm::Client::ActiveModel::InstanceMethods

Defined in:
lib/jsm/client/active_model.rb

Instance Method Summary collapse

Instance Method Details

#current_stateObject



8
9
10
11
# File 'lib/jsm/client/active_model.rb', line 8

def current_state
  attr_state = state_machine.attribute_name
  send(attr_state)
end

#jsm_set_state(val) ⇒ Object



13
14
15
16
# File 'lib/jsm/client/active_model.rb', line 13

def jsm_set_state(val)
  attr_state = state_machine.attribute_name
  send("#{attr_state}=", val)
end