Exception: Tweetwine::HttpError
- Defined in:
- lib/tweetwine/exceptions.rb
Instance Attribute Summary collapse
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
-
#http_message ⇒ Object
readonly
Returns the value of attribute http_message.
Instance Method Summary collapse
-
#initialize(code, message) ⇒ HttpError
constructor
A new instance of HttpError.
- #to_s ⇒ Object
Methods inherited from Error
Constructor Details
#initialize(code, message) ⇒ HttpError
Returns a new instance of HttpError.
44 45 46 |
# File 'lib/tweetwine/exceptions.rb', line 44 def initialize(code, ) @http_code, @http_message = code.to_i, end |
Instance Attribute Details
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
42 43 44 |
# File 'lib/tweetwine/exceptions.rb', line 42 def http_code @http_code end |
#http_message ⇒ Object (readonly)
Returns the value of attribute http_message.
42 43 44 |
# File 'lib/tweetwine/exceptions.rb', line 42 def @http_message end |
Instance Method Details
#to_s ⇒ Object
48 49 50 |
# File 'lib/tweetwine/exceptions.rb', line 48 def to_s "#{http_code} #{}" end |