Exception: Jellyfish::Found

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Found

Returns a new instance of Found.



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

def initialize url; @url = url                             ; end

Instance Attribute Details

#urlObject (readonly)

Returns the value of attribute url.



26
27
28
# File 'lib/jellyfish.rb', line 26

def url
  @url
end

Instance Method Details

#bodyObject



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

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

#headersObject



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

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

#statusObject



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

def status        ; 302                                    ; end