Module: AutomationObject::State::ContainerHelper
Instance Attribute Summary collapse
-
#active ⇒ Object
Whether or not modal is active.
Instance Method Summary collapse
-
#active? ⇒ Boolean
Screen is active or not.
- #changes ⇒ Array<Symbol>
- #element_to_container(name) ⇒ AutomationObject::State::Element
-
#go ⇒ Boolean
Automatically find a way to go to this screen.
- #reset ⇒ Object
Instance Attribute Details
#active ⇒ Object
Whether or not modal is active
7 8 9 |
# File 'lib/automation_object/state/helpers/container_helper.rb', line 7 def active @active end |
Instance Method Details
#active? ⇒ Boolean
Returns screen is active or not
10 11 12 |
# File 'lib/automation_object/state/helpers/container_helper.rb', line 10 def active? @active ||= false end |
#changes ⇒ Array<Symbol>
26 27 28 |
# File 'lib/automation_object/state/helpers/container_helper.rb', line 26 def changes blue_prints.changes end |
#element_to_container(name) ⇒ AutomationObject::State::Element
32 33 34 35 36 37 |
# File 'lib/automation_object/state/helpers/container_helper.rb', line 32 def element_to_container(name) element_name, element_type = blue_prints.element_to_container(name) return unless element_name || element_type send(element_type)[element_name] end |
#go ⇒ Boolean
Automatically find a way to go to this screen
16 17 18 19 20 21 22 23 |
# File 'lib/automation_object/state/helpers/container_helper.rb', line 16 def go if active? utilize return true end AutomaticRouting.new(top, name).route end |
#reset ⇒ Object
39 40 41 42 43 |
# File 'lib/automation_object/state/helpers/container_helper.rb', line 39 def reset elements.values.map(&:reset) element_arrays.values.map(&:reset) element_hashes.values.map(&:reset) end |