Class: IRWebmachine::Application
- Inherits:
-
Object
- Object
- IRWebmachine::Application
- Defined in:
- lib/irwebmachine/application.rb
Instance Method Summary collapse
-
#initialize(app) ⇒ Application
constructor
A new instance of Application.
- #last_request ⇒ Object
- #last_response ⇒ Object
- #unbox ⇒ Object
Constructor Details
#initialize(app) ⇒ Application
Returns a new instance of Application.
2 3 4 5 6 |
# File 'lib/irwebmachine/application.rb', line 2 def initialize(app) @app = to_app app @req = nil @res = nil end |
Instance Method Details
#last_request ⇒ Object
16 17 18 |
# File 'lib/irwebmachine/application.rb', line 16 def last_request @req || raise(RuntimeError, "No active request.", []) end |
#last_response ⇒ Object
12 13 14 |
# File 'lib/irwebmachine/application.rb', line 12 def last_response @res || raise(RuntimeError, "No active request.", []) end |
#unbox ⇒ Object
8 9 10 |
# File 'lib/irwebmachine/application.rb', line 8 def unbox @app end |