Exception: TranslatorText::Error
- Inherits:
-
StandardError
- Object
- StandardError
- TranslatorText::Error
- Defined in:
- lib/translator_text/exceptions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(code:, message:) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Constructor Details
#initialize(code:, message:) ⇒ Error
Returns a new instance of Error.
5 6 7 8 |
# File 'lib/translator_text/exceptions.rb', line 5 def initialize(code:, message:) @code = code = end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/translator_text/exceptions.rb', line 3 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
3 4 5 |
# File 'lib/translator_text/exceptions.rb', line 3 def errors @errors end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/translator_text/exceptions.rb', line 3 def end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/translator_text/exceptions.rb', line 10 def to_s "#{message} (#{code})" end |