Class: Thumbnail::Response::Success
- Inherits:
-
Object
- Object
- Thumbnail::Response::Success
- Defined in:
- lib/thumbnail/response.rb
Instance Attribute Summary collapse
-
#hpricot ⇒ Object
Returns the value of attribute hpricot.
-
#parsed ⇒ Object
Returns the value of attribute parsed.
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
-
#[](arg) ⇒ Object
Access the parsed response as a hash.
-
#initialize(opts = {}) ⇒ Success
constructor
A new instance of Success.
Constructor Details
#initialize(opts = {}) ⇒ Success
Returns a new instance of Success.
49 50 51 52 53 |
# File 'lib/thumbnail/response.rb', line 49 def initialize(opts={}) @parsed = (opts[:parsed].length == 1) ? opts[:parsed].first : opts[:parsed] @hpricot = opts[:hpricot] @xml = opts[:xml] end |
Instance Attribute Details
#hpricot ⇒ Object
Returns the value of attribute hpricot.
47 48 49 |
# File 'lib/thumbnail/response.rb', line 47 def hpricot @hpricot end |
#parsed ⇒ Object
Returns the value of attribute parsed.
47 48 49 |
# File 'lib/thumbnail/response.rb', line 47 def parsed @parsed end |
#xml ⇒ Object
Returns the value of attribute xml.
47 48 49 |
# File 'lib/thumbnail/response.rb', line 47 def xml @xml end |
Instance Method Details
#[](arg) ⇒ Object
Access the parsed response as a hash.
56 57 58 |
# File 'lib/thumbnail/response.rb', line 56 def [](arg) @parsed[arg] end |