Class: Steam::Session::Rails
- Inherits:
-
Steam::Session
- Object
- Steam::Session
- Steam::Session::Rails
- Includes:
- ActionController
- Defined in:
- lib/steam/session/rails.rb
Instance Attribute Summary
Attributes inherited from Steam::Session
Instance Method Summary collapse
-
#controller ⇒ Object
FIXME we only have access to the controller when Steam can run HtmlUnit and the app in one stack.
-
#initialize(browser = nil) ⇒ Rails
constructor
A new instance of Rails.
- #url_for(options) ⇒ Object
Methods inherited from Steam::Session
#method_missing, #respond_to?, #select
Constructor Details
#initialize(browser = nil) ⇒ Rails
Returns a new instance of Rails.
6 7 8 9 10 11 12 13 |
# File 'lib/steam/session/rails.rb', line 6 def initialize(browser = nil) super # install the named routes in this session instance. klass = class << self; self; end ActionController::Routing::Routes.install_helpers(klass) klass.module_eval { public *Routing::Routes.named_routes.helpers } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Steam::Session
Instance Method Details
#controller ⇒ Object
FIXME we only have access to the controller when Steam can run HtmlUnit and the app in one stack
17 18 |
# File 'lib/steam/session/rails.rb', line 17 def controller end |
#url_for(options) ⇒ Object
20 21 22 |
# File 'lib/steam/session/rails.rb', line 20 def url_for() controller ? controller.url_for() : generic_url_rewriter.rewrite() end |