Exception: CdekApi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- CdekApi::Error
- Defined in:
- lib/cdek_api/error.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#raw_body ⇒ Object
readonly
Returns the value of attribute raw_body.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(message = "", params = {}) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(message = "", params = {}) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 10 11 12 13 |
# File 'lib/cdek_api/error.rb', line 5 def initialize( = "", params = {}) @title = params[:title] @detail = params[:detail] @body = params[:body] @raw_body = params[:raw_body] @status_code = params[:status_code] super() end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/cdek_api/error.rb', line 3 def body @body end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
3 4 5 |
# File 'lib/cdek_api/error.rb', line 3 def detail @detail end |
#raw_body ⇒ Object (readonly)
Returns the value of attribute raw_body.
3 4 5 |
# File 'lib/cdek_api/error.rb', line 3 def raw_body @raw_body end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
3 4 5 |
# File 'lib/cdek_api/error.rb', line 3 def status_code @status_code end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
3 4 5 |
# File 'lib/cdek_api/error.rb', line 3 def title @title end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/cdek_api/error.rb', line 15 def to_s super + " " + instance_variables_to_s end |