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.
36 37 38 |
# File 'lib/jasmine/server.rb', line 36 def initialize(url) @url = url end |
Instance Method Details
#call(env) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/jasmine/server.rb', line 40 def call(env) [ 302, { 'Location' => @url }, [] ] end |