Exception: Lexr::UnmatchableTextError
- Inherits:
-
StandardError
- Object
- StandardError
- Lexr::UnmatchableTextError
- Defined in:
- lib/lexr.rb
Instance Attribute Summary collapse
-
#character ⇒ Object
readonly
Returns the value of attribute character.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(character, position) ⇒ UnmatchableTextError
constructor
A new instance of UnmatchableTextError.
- #inspect ⇒ Object
- #message ⇒ Object
Constructor Details
#initialize(character, position) ⇒ UnmatchableTextError
Returns a new instance of UnmatchableTextError.
120 121 122 |
# File 'lib/lexr.rb', line 120 def initialize(character, position) @character, @position = character, position end |
Instance Attribute Details
#character ⇒ Object (readonly)
Returns the value of attribute character.
118 119 120 |
# File 'lib/lexr.rb', line 118 def character @character end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
118 119 120 |
# File 'lib/lexr.rb', line 118 def position @position end |
Instance Method Details
#inspect ⇒ Object
128 129 130 |
# File 'lib/lexr.rb', line 128 def inspect end |
#message ⇒ Object
124 125 126 |
# File 'lib/lexr.rb', line 124 def "Unexpected character '#{character}' at position #{position + 1}" end |