Exception: Glossarist::Errors::InvalidLanguageCodeError

Inherits:
Base
  • Object
show all
Defined in:
lib/glossarist/errors/invalid_language_code_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code:) ⇒ InvalidLanguageCodeError

Returns a new instance of InvalidLanguageCodeError.



8
9
10
11
12
# File 'lib/glossarist/errors/invalid_language_code_error.rb', line 8

def initialize(code:)
  @code = code

  super()
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



6
7
8
# File 'lib/glossarist/errors/invalid_language_code_error.rb', line 6

def code
  @code
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/glossarist/errors/invalid_language_code_error.rb', line 14

def to_s
  "Invalid value for language_code: `#{code}`. It must be 3 characters long string."
end