Exception: BoxtalLite::Error
- Inherits:
-
StandardError
- Object
- StandardError
- BoxtalLite::Error
- Defined in:
- lib/boxtal_lite/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http_body ⇒ Object
readonly
Returns the value of attribute http_body.
-
#http_code ⇒ Object
readonly
Returns the value of attribute http_code.
Instance Method Summary collapse
-
#initialize(message, http_body = nil, http_code = nil) ⇒ Error
constructor
A new instance of Error.
- #inspect ⇒ Object
- #message ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(message, http_body = nil, http_code = nil) ⇒ Error
Returns a new instance of Error.
6 7 8 9 10 |
# File 'lib/boxtal_lite/errors.rb', line 6 def initialize(, http_body = nil, http_code = nil) @message = @http_body = http_body @http_code = http_code end |
Instance Attribute Details
#http_body ⇒ Object (readonly)
Returns the value of attribute http_body.
4 5 6 |
# File 'lib/boxtal_lite/errors.rb', line 4 def http_body @http_body end |
#http_code ⇒ Object (readonly)
Returns the value of attribute http_code.
4 5 6 |
# File 'lib/boxtal_lite/errors.rb', line 4 def http_code @http_code end |
Instance Method Details
#inspect ⇒ Object
12 13 14 |
# File 'lib/boxtal_lite/errors.rb', line 12 def inspect "#{}: #{http_body}" end |
#message ⇒ Object
16 17 18 |
# File 'lib/boxtal_lite/errors.rb', line 16 def @message || self.class.to_s end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/boxtal_lite/errors.rb', line 20 def to_s inspect end |