Method: AutomationObject::State::Hook#before

Defined in:
lib/automation_object/state/hook.rb

#beforeBoolean?

Runs the before hook

Returns:

  • (Boolean, nil)

    return nil unless there is a hook, otherwise boolean depending on success of hook



30
31
32
33
34
35
36
37
38
# File 'lib/automation_object/state/hook.rb', line 30

def before
  return nil if blue_prints.before.empty?

  hook_action = HookAction.new(driver,
                               blue_prints.before,
                               :hook_action, self, location + '[hook_action]')

  hook_action.run
end