Exception: Jellyfish::Found
- Defined in:
- lib/jellyfish.rb
Overview
this would be raised in redirect
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #body ⇒ Object
- #headers ⇒ Object
-
#initialize(url) ⇒ Found
constructor
A new instance of Found.
- #status ⇒ Object
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
#url ⇒ Object (readonly)
Returns the value of attribute url.
29 30 31 |
# File 'lib/jellyfish.rb', line 29 def url @url end |
Instance Method Details
#body ⇒ Object
33 |
# File 'lib/jellyfish.rb', line 33 def body ; super.map{ |b| b.gsub('VAR_URL', url) }; end |
#headers ⇒ Object
32 |
# File 'lib/jellyfish.rb', line 32 def headers ; super.merge('Location' => url) ; end |
#status ⇒ Object
31 |
# File 'lib/jellyfish.rb', line 31 def status ; 302 ; end |