Exception: Jellyfish::Found

Inherits:
Response
  • Object
show all
Defined in:
lib/jellyfish.rb

Overview

this would be raised in redirect

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Found

Returns a new instance of Found.



30
# File 'lib/jellyfish.rb', line 30

def initialize url; @url = url                             ; end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



29
30
31
# File 'lib/jellyfish.rb', line 29

def url
  @url
end

Instance Method Details

#bodyObject



33
# File 'lib/jellyfish.rb', line 33

def body          ; super.map{ |b| b.gsub('VAR_URL', url) }; end

#headersObject



32
# File 'lib/jellyfish.rb', line 32

def headers       ; super.merge('Location' => url)         ; end

#statusObject



31
# File 'lib/jellyfish.rb', line 31

def status        ; 302                                    ; end