Exception: Crowdin::API::Errors::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Crowdin::API::Errors::Error
- Defined in:
- lib/crowdin-api/errors.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(error_code, error_message) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(error_code, error_message) ⇒ Error
Returns a new instance of Error.
10 11 12 13 14 |
# File 'lib/crowdin-api/errors.rb', line 10 def initialize(error_code, ) @error_code = error_code.to_i @error_message = @message = "#{error_code}: #{}" end |
Instance Attribute Details
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code.
6 7 8 |
# File 'lib/crowdin-api/errors.rb', line 6 def error_code @error_code end |
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
7 8 9 |
# File 'lib/crowdin-api/errors.rb', line 7 def @error_message end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/crowdin-api/errors.rb', line 8 def @message end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/crowdin-api/errors.rb', line 16 def to_s @message end |