Exception: Starcall::Errors::InvalidLanguage

Inherits:
StandardError
  • Object
show all
Defined in:
lib/starcall/errors/invalid_language.rb

Overview

A Custom error message, used when an incorrect language is passed.

Instance Method Summary collapse

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

#messageObject



12
13
14
# File 'lib/starcall/errors/invalid_language.rb', line 12

def message
  "#{language} is not a valid language. Please consult Starcall::Languages.list for a list of valid languages."
end