Class: AutomationObject::State::Modal
- Includes:
- ContainerHelper
- Defined in:
- lib/automation_object/state/modal.rb
Overview
Modal composite for managing state
Instance Attribute Summary
Attributes included from ContainerHelper
Attributes inherited from Base
Attributes inherited from Composite
#children, #location, #name, #parent
Instance Method Summary collapse
Methods included from ContainerHelper
#active?, #changes, #element_to_container, #go, #reset
Methods inherited from Base
#get_child, #get_children, #initialize, #screen, #top
Methods inherited from Composite
#add_has_many_relationships, #add_has_one_relationships, #get_child, #get_children, has_many, has_many_relationships, has_one, has_one_relationships, #initialize, #top
Methods included from Reflection
Methods included from CompositeHook
#after_create_run, #before_create_run, included
Constructor Details
This class inherits a constructor from AutomationObject::State::Base
Instance Method Details
#activate ⇒ Object
28 29 30 |
# File 'lib/automation_object/state/modal.rb', line 28 def activate @active = true end |
#deactivate ⇒ Object
32 33 34 35 |
# File 'lib/automation_object/state/modal.rb', line 32 def deactivate @active = false reset end |
#utilize ⇒ Object
24 25 26 |
# File 'lib/automation_object/state/modal.rb', line 24 def utilize raise ModalNotActiveError, name unless active? end |