Exception: Lifelike::UnexpectedCharacterError

Inherits:
LifelikeError
  • Object
show all
Defined in:
lib/lifelike/error.rb

Instance Method Summary collapse

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