Class: TestCentricity::ScreenManager
- Defined in:
- lib/testcentricity_apps.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.
35 36 37 |
# File 'lib/testcentricity_apps.rb', line 35 def current_screen @current_screen end |
Class Method Details
.current_screen ⇒ ScreenObject
Get the currently active ScreenObject
66 67 68 |
# File 'lib/testcentricity_apps.rb', line 66 def self.current_screen @current_screen end |
.current_screen=(screen) ⇒ Object
Sets the currently active ScreenObject
76 77 78 |
# File 'lib/testcentricity_apps.rb', line 76 def self.current_screen=(screen) @current_screen = screen end |
.find_screen(screen_name) ⇒ Object
53 54 55 56 57 58 |
# File 'lib/testcentricity_apps.rb', line 53 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?
49 50 51 |
# File 'lib/testcentricity_apps.rb', line 49 def self.loaded? !@screen_objects.empty? end |
.register_screen_objects(screens) ⇒ Object
39 40 41 |
# File 'lib/testcentricity_apps.rb', line 39 def self.register_screen_objects(screens) @screen_objects = screens end |