Exception: Telesocial::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Telesocial::Error
- Defined in:
- lib/telesocial/errors.rb
Direct Known Subclasses
BadGateway, BadRequest, NotFound, RequestEntityTooLarge, Unauthorized, UnsupportedMediaTpe
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #info(text = '', env = Hashie::Mash.new) ⇒ Object
-
#initialize(message, response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, response) ⇒ Error
5 6 7 8 |
# File 'lib/telesocial/errors.rb', line 5 def initialize(, response) @response = response super(info(, response)) end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/telesocial/errors.rb', line 3 def response @response end |
Instance Method Details
#info(text = '', env = Hashie::Mash.new) ⇒ Object
10 11 12 |
# File 'lib/telesocial/errors.rb', line 10 def info(text = '', env = Hashie::Mash.new) "#{text} - (server message: #{env.})" end |