Class: Jasmine::Redirect
- Inherits:
-
Object
- Object
- Jasmine::Redirect
- Defined in:
- lib/jasmine/server.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(url) ⇒ Redirect
constructor
A new instance of Redirect.
Constructor Details
#initialize(url) ⇒ Redirect
Returns a new instance of Redirect.
67 68 69 |
# File 'lib/jasmine/server.rb', line 67 def initialize(url) @url = url end |
Instance Method Details
#call(env) ⇒ Object
71 72 73 74 75 76 77 |
# File 'lib/jasmine/server.rb', line 71 def call(env) [ 302, { 'Location' => @url }, [] ] end |