class EndState::Action
Attributes
object[R]
state[R]
Public Class Methods
new(object, state)
click to toggle source
# File lib/end_state/action.rb, line 5 def initialize(object, state) @object = object @state = state end
Public Instance Methods
call()
click to toggle source
# File lib/end_state/action.rb, line 10 def call object.state = object.class.store_states_as_strings ? state.to_s : state.to_sym true end
rollback()
click to toggle source
# File lib/end_state/action.rb, line 15 def rollback call end