Class: RMachine::ChangeStateValueNotifier
- Inherits:
-
Object
- Object
- RMachine::ChangeStateValueNotifier
- Defined in:
- lib/r_machine/notifiers/change_state_value_notifier.rb
Instance Attribute Summary collapse
-
#new_value ⇒ Object
readonly
Returns the value of attribute new_value.
-
#state_template ⇒ Object
readonly
Returns the value of attribute state_template.
Instance Method Summary collapse
-
#initialize(params) ⇒ ChangeStateValueNotifier
constructor
A new instance of ChangeStateValueNotifier.
- #notify! ⇒ Object
Constructor Details
#initialize(params) ⇒ ChangeStateValueNotifier
Returns a new instance of ChangeStateValueNotifier.
5 6 7 8 |
# File 'lib/r_machine/notifiers/change_state_value_notifier.rb', line 5 def initialize(params) @state_template = params[:state_template] @new_value = params[:new_value] end |
Instance Attribute Details
#new_value ⇒ Object (readonly)
Returns the value of attribute new_value.
3 4 5 |
# File 'lib/r_machine/notifiers/change_state_value_notifier.rb', line 3 def new_value @new_value end |
#state_template ⇒ Object (readonly)
Returns the value of attribute state_template.
3 4 5 |
# File 'lib/r_machine/notifiers/change_state_value_notifier.rb', line 3 def state_template @state_template end |
Instance Method Details
#notify! ⇒ Object
10 11 12 |
# File 'lib/r_machine/notifiers/change_state_value_notifier.rb', line 10 def notify! state_template.state = new_value end |