Exception: Jellyfish::Found
- Defined in:
- lib/jellyfish.rb
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.
27 |
# File 'lib/jellyfish.rb', line 27 def initialize url; @url = url ; end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
26 27 28 |
# File 'lib/jellyfish.rb', line 26 def url @url end |
Instance Method Details
#body ⇒ Object
30 |
# File 'lib/jellyfish.rb', line 30 def body ; super.map{ |b| b.gsub('VAR_URL', url) }; end |
#headers ⇒ Object
29 |
# File 'lib/jellyfish.rb', line 29 def headers ; super.merge(LOCATION => url) ; end |
#status ⇒ Object
28 |
# File 'lib/jellyfish.rb', line 28 def status ; 302 ; end |