Exception: Starcall::Errors::InvalidLanguage
- Inherits:
-
StandardError
- Object
- StandardError
- Starcall::Errors::InvalidLanguage
- Defined in:
- lib/starcall/errors/invalid_language.rb
Overview
A Custom error message, used when an incorrect language is passed.
Instance Method Summary collapse
-
#initialize(language:) ⇒ InvalidLanguage
constructor
A new instance of InvalidLanguage.
- #message ⇒ Object
Constructor Details
#initialize(language:) ⇒ InvalidLanguage
Returns a new instance of InvalidLanguage.
7 8 9 10 |
# File 'lib/starcall/errors/invalid_language.rb', line 7 def initialize(language:) super @language = language end |
Instance Method Details
#message ⇒ Object
12 13 14 |
# File 'lib/starcall/errors/invalid_language.rb', line 12 def "#{language} is not a valid language. Please consult Starcall::Languages.list for a list of valid languages." end |