Class: AutomationObject::Framework
- Inherits:
-
Proxy::Proxy
- Object
- Proxy::Proxy
- AutomationObject::Framework
- Defined in:
- lib/automation_object/framework.rb
Overview
Framework class, the core A Proxy class that will become the DSL Framework
Class Attribute Summary collapse
-
.singleton ⇒ Object
Returns the value of attribute singleton.
Instance Attribute Summary collapse
- #blue_prints ⇒ AutomationObject::BluePrint::Composite::Top
- #driver ⇒ AutomationObject::Driver::Driver
-
#dsl ⇒ Dsl
Workable dsl composite object.
- #state ⇒ AutomationObject::State::Session
Class Method Summary collapse
-
.get ⇒ AutomationObject::Framework
Singleton method if using Cucumber.
Instance Method Summary collapse
-
#current_screen ⇒ AutomationObject::Dsl::ScreenProxy
Current Screen.
-
#initialize(driver, blue_prints) ⇒ Framework
constructor
Will assume nil or :nokogiri is XML based and AutomationObject can also automate XML.
-
#quit ⇒ void
Reset the entire state, remove any values Leave the driver alone here, can be done elsewhere.
-
#screen(name) ⇒ AutomationObject::Dsl::ScreenProxy
Retrieve screen from composite.
Methods inherited from Proxy::Proxy
Constructor Details
#initialize(driver, blue_prints) ⇒ Framework
Will assume nil or :nokogiri is XML based and AutomationObject can also automate XML
31 32 33 34 35 36 37 38 39 |
# File 'lib/automation_object/framework.rb', line 31 def initialize(driver, blue_prints) self.driver = driver self.blue_prints = blue_prints self.state = State.create(self.driver, self.blue_prints) @subject = Dsl.create(self.blue_prints, state) AutomationObject::Framework.singleton = self end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class AutomationObject::Proxy::Proxy
Class Attribute Details
.singleton ⇒ Object
Returns the value of attribute singleton
92 93 94 |
# File 'lib/automation_object/framework.rb', line 92 def singleton @singleton end |
Instance Attribute Details
#blue_prints ⇒ AutomationObject::BluePrint::Composite::Top
16 17 18 |
# File 'lib/automation_object/framework.rb', line 16 def blue_prints @blue_prints end |
#driver ⇒ AutomationObject::Driver::Driver
19 20 21 |
# File 'lib/automation_object/framework.rb', line 19 def driver @driver end |
#dsl ⇒ Dsl
Returns workable dsl composite object
25 26 27 |
# File 'lib/automation_object/framework.rb', line 25 def dsl @dsl end |
#state ⇒ AutomationObject::State::Session
22 23 24 |
# File 'lib/automation_object/framework.rb', line 22 def state @state end |
Class Method Details
.get ⇒ AutomationObject::Framework
Singleton method if using Cucumber
96 97 98 |
# File 'lib/automation_object/framework.rb', line 96 def get singleton end |
Instance Method Details
#current_screen ⇒ AutomationObject::Dsl::ScreenProxy
Current Screen
51 52 53 |
# File 'lib/automation_object/framework.rb', line 51 def current_screen @subject.current_screen end |
#quit ⇒ void
This method returns an undefined value.
Reset the entire state, remove any values Leave the driver alone here, can be done elsewhere
83 84 85 86 |
# File 'lib/automation_object/framework.rb', line 83 def quit state.quit # Quit the state. That way it knows to kill threads if operational self.dsl, self.state, self.blue_prints, self.driver = nil end |
#screen(name) ⇒ AutomationObject::Dsl::ScreenProxy
Retrieve screen from composite
45 46 47 |
# File 'lib/automation_object/framework.rb', line 45 def screen(name) @subject.screen(name) end |