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.



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