Class: AutomationObject::BluePrint::Composite::Hook

Inherits:
Base
  • Object
show all
Defined in:
lib/automation_object/blue_print/composite/hook.rb

Overview

Hook composite class

Instance Attribute Summary

Attributes inherited from Base

#adapter

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from AutomationObject::BluePrint::Composite::Base

Instance Method Details

#afterAutomationObject::BluePrint::Composite::HookAction



17
18
19
# File 'lib/automation_object/blue_print/composite/hook.rb', line 17

def after
  adapter.after
end

#beforeAutomationObject::BluePrint::Composite::HookAction



12
13
14
# File 'lib/automation_object/blue_print/composite/hook.rb', line 12

def before
  adapter.before
end

#changesArray<Symbol>

Get possible changes

Returns:

  • (Array<Symbol>)


28
29
30
31
# File 'lib/automation_object/blue_print/composite/hook.rb', line 28

def changes
  [before.change_screen, before.new_screen,
   after.change_screen, after.new_screen, before.show_modal, after.show_modal].uniq.compact
end

#changes_to_container?(name) ⇒ Boolean

Parameters:

  • name (Symbol)

Returns:

  • (Boolean)


35
36
37
# File 'lib/automation_object/blue_print/composite/hook.rb', line 35

def changes_to_container?(name)
  changes.include?(name)
end

#live?Array<AutomationObject::BluePrint::Composite::HookElementRequirements>

Returns array of element requirements

Returns:



22
23
24
# File 'lib/automation_object/blue_print/composite/hook.rb', line 22

def live?
  adapter.live?
end