Module: AutomationObject::BluePrint::Composite::ElementHelper

Included in:
Element, ElementArray, ElementHash
Defined in:
lib/automation_object/blue_print/composite/helpers/element_helper.rb

Overview

Helper module for Element composite classes

Instance Method Summary collapse

Instance Method Details

#changesArray<Symbol>

Get possible changes



39
40
41
42
43
44
45
46
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 39

def changes
  changes = []
  method_hooks.each_value do |hook|
    changes += hook.changes
  end

  changes.uniq.compact
end

#default_inputString?



9
10
11
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 9

def default_input
  adapter.default_input
end

#in_iframeSymbol?



19
20
21
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 19

def in_iframe
  adapter.in_iframe
end

#in_iframe?Boolean



24
25
26
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 24

def in_iframe?
  adapter.in_iframe?
end

#method_hook?(name) ⇒ Boolean



28
29
30
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 28

def method_hook?(name)
  adapter.method_hook?(name)
end

#method_hooksHash<AutomationObject::BluePrint::Composite::Hook>



33
34
35
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 33

def method_hooks
  adapter.method_hooks
end

#method_to_container(name) ⇒ Symbol



50
51
52
53
54
55
56
57
58
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 50

def method_to_container(name)
  method_hooks.each do |method_name, hook|
    next unless hook.changes.include?(name)

    return method_name
  end

  nil
end

#selector_paramsArray<Symbol, String>?



14
15
16
# File 'lib/automation_object/blue_print/composite/helpers/element_helper.rb', line 14

def selector_params
  adapter.selector_params
end