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.
7 8 9 10 |
# File 'lib/translator_text/exceptions.rb', line 7 def initialize(code:, message:) @code = code @message = end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/translator_text/exceptions.rb', line 5 def code @code end |
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
5 6 7 |
# File 'lib/translator_text/exceptions.rb', line 5 def errors @errors end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
5 6 7 |
# File 'lib/translator_text/exceptions.rb', line 5 def @message end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/translator_text/exceptions.rb', line 12 def to_s "#{} (#{code})" end |