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.



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

def initialize url; @url = url                             ; end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



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

def url
  @url
end

Instance Method Details

#bodyObject



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

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

#headersObject



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

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

#statusObject



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

def status        ; 302                                    ; end