Module: Yasm::Context
- Defined in:
- lib/yasm/context.rb,
lib/yasm/context/state_container.rb,
lib/yasm/context/state_configuration.rb,
lib/yasm/context/anonymous_state_identifier.rb,
lib/yasm/context/state_configuration/action_hook.rb
Defined Under Namespace
Modules: ClassMethods
Classes: StateConfiguration, StateContainer
Constant Summary
collapse
- ANONYMOUS_STATE =
:yasm_anonymous_state
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Method Details
#do!(*actions) ⇒ Object
46
47
48
|
# File 'lib/yasm/context.rb', line 46
def do!(*actions)
state.do! *actions
end
|
#fast_forward ⇒ Object
55
56
57
|
# File 'lib/yasm/context.rb', line 55
def fast_forward
self.class.state_configurations.keys.each { |state_name| state_container(state_name).value }
end
|
#state ⇒ Object
50
51
52
53
|
# File 'lib/yasm/context.rb', line 50
def state
raise "This class has no anonymous state" unless self.class.state_configurations[ANONYMOUS_STATE]
state_container ANONYMOUS_STATE
end
|