Class: Steam::Session
- Inherits:
-
Object
- Object
- Steam::Session
- Includes:
- Locator::Matcher, Test::Unit::Assertions
- Defined in:
- lib/steam/session.rb,
lib/steam/session/rails.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Rails
Instance Attribute Summary collapse
-
#browser ⇒ Object
TODO include Rspec::Something if defined?(Rspec).
Instance Method Summary collapse
-
#initialize(browser = nil) ⇒ Session
constructor
A new instance of Session.
- #method_missing(method, *args, &block) ⇒ Object
- #respond_to?(method) ⇒ Boolean
-
#select(*args, &block) ⇒ Object
because Class implements #select.
Constructor Details
#initialize(browser = nil) ⇒ Session
Returns a new instance of Session.
17 18 19 |
# File 'lib/steam/session.rb', line 17 def initialize(browser = nil) @browser = browser end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
25 26 27 28 |
# File 'lib/steam/session.rb', line 25 def method_missing(method, *args, &block) return browser.send(method, *args, &block) # if browser.respond_to?(method) super end |
Instance Attribute Details
#browser ⇒ Object
TODO include Rspec::Something if defined?(Rspec)
15 16 17 |
# File 'lib/steam/session.rb', line 15 def browser @browser end |
Instance Method Details
#respond_to?(method) ⇒ Boolean
21 22 23 |
# File 'lib/steam/session.rb', line 21 def respond_to?(method) browser.respond_to?(method) ? true : super end |
#select(*args, &block) ⇒ Object
because Class implements #select
30 31 32 |
# File 'lib/steam/session.rb', line 30 def select(*args, &block) # because Class implements #select browser.select(*args, &block) end |