Class: Jasmine::Redirect

Inherits:
Object
  • Object
show all
Defined in:
lib/jasmine/server.rb

Instance Method Summary collapse

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