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