Module: AutomationObject::BluePrint::Composite::ContainerHelper
- Defined in:
- lib/automation_object/blue_print/composite/helpers/container_helper.rb
Overview
Screen composite class
Instance Method Summary collapse
-
#changes ⇒ Array<Symbol>
Get possible changes.
- #element_arrays ⇒ Hash<AutomationObject::BluePrint::Composite::ElementArray>
- #element_hashes ⇒ Hash<AutomationObject::BluePrint::Composite::ElementHash>
-
#element_to_container(name) ⇒ Symbol
Name and type of element.
- #elements ⇒ Hash<AutomationObject::BluePrint::Composite::Element>
- #included_views ⇒ Array<Symbol>
- #load ⇒ AutomationObject::BluePrint::Composite::Hook
Instance Method Details
#changes ⇒ Array<Symbol>
Get possible changes
36 37 38 39 40 41 42 43 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 36 def changes changes = [] elements.merge(element_arrays).merge(element_hashes).each_value do |element| changes += element.changes end changes.uniq.compact end |
#element_arrays ⇒ Hash<AutomationObject::BluePrint::Composite::ElementArray>
25 26 27 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 25 def element_arrays adapter.element_arrays end |
#element_hashes ⇒ Hash<AutomationObject::BluePrint::Composite::ElementHash>
30 31 32 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 30 def element_hashes adapter.element_hashes end |
#element_to_container(name) ⇒ Symbol
Returns name and type of element
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 47 def element_to_container(name) elements.merge(element_arrays).merge(element_hashes).each do |element_name, element| next unless element.changes.include?(name) element_type = nil case element when Element element_type = :elements when ElementArray element_type = :element_arrays when ElementHash element_type = :element_hashes end return element_name, element_type end [nil, nil] end |
#elements ⇒ Hash<AutomationObject::BluePrint::Composite::Element>
20 21 22 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 20 def elements adapter.elements end |
#included_views ⇒ Array<Symbol>
10 11 12 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 10 def included_views adapter.included_views end |
#load ⇒ AutomationObject::BluePrint::Composite::Hook
15 16 17 |
# File 'lib/automation_object/blue_print/composite/helpers/container_helper.rb', line 15 def load adapter.load end |