Exception: Glossarist::InvalidLanguageCodeError
- Defined in:
- lib/glossarist/error/invalid_language_code_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code:) ⇒ InvalidLanguageCodeError
constructor
A new instance of InvalidLanguageCodeError.
- #to_s ⇒ Object
Constructor Details
#initialize(code:) ⇒ InvalidLanguageCodeError
Returns a new instance of InvalidLanguageCodeError.
5 6 7 8 9 |
# File 'lib/glossarist/error/invalid_language_code_error.rb', line 5 def initialize(code:) @code = code super() end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/glossarist/error/invalid_language_code_error.rb', line 3 def code @code end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/glossarist/error/invalid_language_code_error.rb', line 11 def to_s "Invalid value for language_code: `#{code}`. It must be 3 characters long string." end |