Class: AutomationObject::Dsl::ElementProxy

Inherits:
Proxy show all
Defined in:
lib/automation_object/dsl/element.rb

Overview

Proxy for Element

Instance Method Summary collapse

Constructor Details

#initialize(blue_prints, state, name) ⇒ ElementProxy

Returns a new instance of ElementProxy



16
17
18
# File 'lib/automation_object/dsl/element.rb', line 16

def initialize(blue_prints, state, name)
  super Element, blue_prints, state, name
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object

Parameters:

  • method (Symbol)
  • args (Array, nil)
  • block (Proc)


23
24
25
26
27
28
29
# File 'lib/automation_object/dsl/element.rb', line 23

def method_missing(method, *args, &block)
  return super if Element.methods.include?(method)

  @subject = @state.utilize

  super
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/automation_object/dsl/element.rb', line 32

def active?
  @state.active?
end