Class: Thumbnail::Response::Success

Inherits:
Object
  • Object
show all
Defined in:
lib/thumbnail/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hpricotObject

Returns the value of attribute hpricot.



47
48
49
# File 'lib/thumbnail/response.rb', line 47

def hpricot
  @hpricot
end

#parsedObject

Returns the value of attribute parsed.



47
48
49
# File 'lib/thumbnail/response.rb', line 47

def parsed
  @parsed
end

#xmlObject

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