Exception: Lifelike::UnexpectedCharacterError
- Inherits:
-
LifelikeError
- Object
- StandardError
- LifelikeError
- Lifelike::UnexpectedCharacterError
- Defined in:
- lib/lifelike/error.rb
Instance Method Summary collapse
-
#initialize(character, expected:) ⇒ UnexpectedCharacterError
constructor
A new instance of UnexpectedCharacterError.
Constructor Details
#initialize(character, expected:) ⇒ UnexpectedCharacterError
Returns a new instance of UnexpectedCharacterError.
14 15 16 17 |
# File 'lib/lifelike/error.rb', line 14 def initialize(character, expected:) super "Unexpected character: \"#{character}\" " \ "Expected: #{expected.map { |c| "\"#{c}\"" }.join(' or ')}" end |