Class: AutomationObject::Dsl::TopProxy
- Inherits:
-
Proxy
- Object
- Proxy::Proxy
- Proxy
- AutomationObject::Dsl::TopProxy
- Defined in:
- lib/automation_object/dsl/top.rb
Overview
Proxy for Top Composite Use proxy for methods trying to do a @state call
Instance Method Summary collapse
- #active? ⇒ Boolean
-
#current_screen ⇒ AutomationObject::Dsl::ScreenProxy
Current Screen.
-
#initialize(blue_prints, state, name) ⇒ TopProxy
constructor
A new instance of TopProxy.
-
#screen(name) ⇒ AutomationObject::Dsl::ScreenProxy
Retrieve screen from composite.
Methods inherited from Proxy::Proxy
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AutomationObject::Proxy::Proxy
Instance Method Details
#active? ⇒ Boolean
26 27 28 |
# File 'lib/automation_object/dsl/top.rb', line 26 def active? true end |
#current_screen ⇒ AutomationObject::Dsl::ScreenProxy
Current Screen
43 44 45 |
# File 'lib/automation_object/dsl/top.rb', line 43 def current_screen @subject.send(@state.current_screen) end |
#screen(name) ⇒ AutomationObject::Dsl::ScreenProxy
Retrieve screen from composite
34 35 36 37 38 39 |
# File 'lib/automation_object/dsl/top.rb', line 34 def screen(name) name = name.to_sym raise AutomationObject::Dsl::Error::ScreenDoesNotExistError, name unless @subject.to_h.include?(name) @subject.send(name) end |