Exception: Wesabe::Request::RequestFailed
- Defined in:
- lib/wesabe/request.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response = nil) ⇒ RequestFailed
constructor
A new instance of RequestFailed.
- #inspect ⇒ Object
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(response = nil) ⇒ RequestFailed
Returns a new instance of RequestFailed.
166 167 168 |
# File 'lib/wesabe/request.rb', line 166 def initialize(response=nil) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
164 165 166 |
# File 'lib/wesabe/request.rb', line 164 def response @response end |
Instance Method Details
#inspect ⇒ Object
182 183 184 |
# File 'lib/wesabe/request.rb', line 182 def inspect "#<#{self.class.name} Status=#{response.code} Message=#{.inspect}>" end |
#message ⇒ Object
170 171 172 173 174 175 176 |
# File 'lib/wesabe/request.rb', line 170 def begin (Hpricot.XML(response.body) / :error / :message).inner_text rescue response.body end end |
#to_s ⇒ Object
178 179 180 |
# File 'lib/wesabe/request.rb', line 178 def to_s end |