Class: Yasm::Context::StateContainer
- Inherits:
-
Object
- Object
- Yasm::Context::StateContainer
- Defined in:
- lib/yasm/context/state_container.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#state ⇒ Object
:nodoc:.
Instance Method Summary collapse
- #do!(*actions) ⇒ Object
-
#initialize(options) ⇒ StateContainer
constructor
A new instance of StateContainer.
- #value ⇒ Object
Constructor Details
#initialize(options) ⇒ StateContainer
Returns a new instance of StateContainer.
7 8 9 10 11 |
# File 'lib/yasm/context/state_container.rb', line 7 def initialize() @context = [:context] @state = [:state] @name = [:name] end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
4 5 6 |
# File 'lib/yasm/context/state_container.rb', line 4 def context @context end |
#state ⇒ Object
:nodoc:
5 6 7 |
# File 'lib/yasm/context/state_container.rb', line 5 def state @state end |
Instance Method Details
#do!(*actions) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/yasm/context/state_container.rb', line 28 def do!(*actions) actions.each do |action| run_before_action_hooks action fire! action run_after_action_hooks action end end |
#value ⇒ Object
13 |
# File 'lib/yasm/context/state_container.rb', line 13 def value; state; end |