Exception: Entrata::Request::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Entrata::Request::Error
- Defined in:
- lib/entrata/request/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#msg ⇒ Object
readonly
Returns the value of attribute msg.
Instance Method Summary collapse
-
#initialize(msg = nil, code = nil) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(msg = nil, code = nil) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 |
# File 'lib/entrata/request/error.rb', line 4 def initialize(msg = nil, code = nil) super(msg) @code = code @msg = msg end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
18 19 20 |
# File 'lib/entrata/request/error.rb', line 18 def code @code end |
#msg ⇒ Object (readonly)
Returns the value of attribute msg.
18 19 20 |
# File 'lib/entrata/request/error.rb', line 18 def msg @msg end |
Instance Method Details
#to_s ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/entrata/request/error.rb', line 10 def to_s if code "message: #{msg}, code: #{code}" else msg end end |