Exception: Besepa::Errors::BesepaError
- Inherits:
-
StandardError
- Object
- StandardError
- Besepa::Errors::BesepaError
- Defined in:
- lib/besepa/errors/besepa_error.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
-
#initialize(error = nil, description = nil, http_status = nil, messages = nil) ⇒ BesepaError
constructor
A new instance of BesepaError.
- #to_s ⇒ Object
Constructor Details
#initialize(error = nil, description = nil, http_status = nil, messages = nil) ⇒ BesepaError
Returns a new instance of BesepaError.
10 11 12 13 14 15 |
# File 'lib/besepa/errors/besepa_error.rb', line 10 def initialize(error=nil, description=nil, http_status=nil, =nil) @messages = @http_status = http_status @description = description @error = error end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
6 7 8 |
# File 'lib/besepa/errors/besepa_error.rb', line 6 def description @description end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/besepa/errors/besepa_error.rb', line 5 def error @error end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
7 8 9 |
# File 'lib/besepa/errors/besepa_error.rb', line 7 def http_status @http_status end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
8 9 10 |
# File 'lib/besepa/errors/besepa_error.rb', line 8 def @messages end |
Instance Method Details
#to_s ⇒ Object
17 18 19 20 |
# File 'lib/besepa/errors/besepa_error.rb', line 17 def to_s status_string = @http_status.nil? ? "" : "(Status #{@http_status}) " "#{status_string}#{@error} (#{@description})" end |