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.
134 135 136 |
# File 'lib/lexr.rb', line 134 def initialize(character, position) @character, @position = character, position end |
Instance Attribute Details
#character ⇒ Object (readonly)
Returns the value of attribute character.
132 133 134 |
# File 'lib/lexr.rb', line 132 def character @character end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
132 133 134 |
# File 'lib/lexr.rb', line 132 def position @position end |
Instance Method Details
#inspect ⇒ Object
142 143 144 |
# File 'lib/lexr.rb', line 142 def inspect end |
#message ⇒ Object
138 139 140 |
# File 'lib/lexr.rb', line 138 def "Unexpected character '#{character}' at position #{position + 1}" end |