Method: AutomationObject::BluePrint::HashAdapter::HookElementRequirements#hook_order

Defined in:
lib/automation_object/blue_print/hash_adapter/hook_element_requirements.rb

#hook_orderArray<Symbol>

Get the order to run the hook in

Returns:

  • (Array<Symbol>)

    list of hook methods to run in given order



17
18
19
20
21
22
23
24
25
# File 'lib/automation_object/blue_print/hash_adapter/hook_element_requirements.rb', line 17

def hook_order
  hook_order = [:exists?] # Always put exists? first

  hash.each_key do |hook_name|
    hook_order.push(hook_name) unless %i[element_name exists?].include?(hook_name)
  end

  hook_order
end