Exception: Accredible::AccredibleError
- Inherits:
-
StandardError
- Object
- StandardError
- Accredible::AccredibleError
- Defined in:
- lib/accredible-ruby/errors/accredible_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, status = nil, body = nil) ⇒ AccredibleError
constructor
A new instance of AccredibleError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, status = nil, body = nil) ⇒ AccredibleError
Returns a new instance of AccredibleError.
7 8 9 10 11 |
# File 'lib/accredible-ruby/errors/accredible_error.rb', line 7 def initialize(=nil, status=nil, body=nil) = @status = status @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/accredible-ruby/errors/accredible_error.rb', line 5 def body @body end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/accredible-ruby/errors/accredible_error.rb', line 3 def end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/accredible-ruby/errors/accredible_error.rb', line 4 def status @status end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 |
# File 'lib/accredible-ruby/errors/accredible_error.rb', line 13 def to_s status = "(Status #{@status}) " if @status.nil? "#{status}#{@message}" end |