Exception: ComponentEmbeddedRuby::UnexpectedTokenError
- Inherits:
-
StandardError
- Object
- StandardError
- ComponentEmbeddedRuby::UnexpectedTokenError
- Defined in:
- lib/component_embedded_ruby/unexpected_token_error.rb
Instance Attribute Summary collapse
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#got ⇒ Object
readonly
Returns the value of attribute got.
Instance Method Summary collapse
-
#initialize(expected, got) ⇒ UnexpectedTokenError
constructor
A new instance of UnexpectedTokenError.
- #message ⇒ Object
Constructor Details
#initialize(expected, got) ⇒ UnexpectedTokenError
5 6 7 8 |
# File 'lib/component_embedded_ruby/unexpected_token_error.rb', line 5 def initialize(expected, got) @expected = expected @got = got end |
Instance Attribute Details
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
3 4 5 |
# File 'lib/component_embedded_ruby/unexpected_token_error.rb', line 3 def expected @expected end |
#got ⇒ Object (readonly)
Returns the value of attribute got.
3 4 5 |
# File 'lib/component_embedded_ruby/unexpected_token_error.rb', line 3 def got @got end |
Instance Method Details
#message ⇒ Object
10 11 12 |
# File 'lib/component_embedded_ruby/unexpected_token_error.rb', line 10 def "Unexpected token at column #{got.position}, got #{got.value}#{expected_message}." end |