Class: TestCentricity::ScreenManager
- Defined in:
- lib/testcentricity_mobile.rb
Instance Attribute Summary collapse
-
#current_screen ⇒ Object
Returns the value of attribute current_screen.
Class Method Summary collapse
-
.current_screen ⇒ ScreenObject
Get the currently active ScreenObject.
-
.current_screen=(screen) ⇒ Object
Sets the currently active ScreenObject.
- .find_screen(screen_name) ⇒ Object
-
.loaded? ⇒ Boolean
Have all ScreenObjects been registered?.
- .register_screen_objects(screens) ⇒ Object
Instance Attribute Details
#current_screen ⇒ Object
Returns the value of attribute current_screen.
33 34 35 |
# File 'lib/testcentricity_mobile.rb', line 33 def current_screen @current_screen end |
Class Method Details
.current_screen ⇒ ScreenObject
Get the currently active ScreenObject
64 65 66 |
# File 'lib/testcentricity_mobile.rb', line 64 def self.current_screen @current_screen end |
.current_screen=(screen) ⇒ Object
Sets the currently active ScreenObject
74 75 76 |
# File 'lib/testcentricity_mobile.rb', line 74 def self.current_screen=(screen) @current_screen = screen end |
.find_screen(screen_name) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/testcentricity_mobile.rb', line 51 def self.find_screen(screen_name) screen_id = (screen_name.is_a? String) ? screen_name.gsub(/\s+/, '').downcase.to_sym : screen_name screen = @screen_objects[screen_id] raise "No screen object defined for screen named '#{screen_name}'" unless screen screen end |
.loaded? ⇒ Boolean
Have all ScreenObjects been registered?
47 48 49 |
# File 'lib/testcentricity_mobile.rb', line 47 def self.loaded? !@screen_objects.empty? end |
.register_screen_objects(screens) ⇒ Object
37 38 39 |
# File 'lib/testcentricity_mobile.rb', line 37 def self.register_screen_objects(screens) @screen_objects = screens end |