Class: RDF::Turtle::Reader::SyntaxError
- Inherits:
-
ReaderError
- Object
- ReaderError
- RDF::Turtle::Reader::SyntaxError
- Defined in:
- lib/rdf/turtle/reader.rb
Instance Attribute Summary collapse
-
#lineno ⇒ Integer
readonly
The line number where the error occurred.
-
#production ⇒ Symbol
readonly
The current production.
-
#token ⇒ String
readonly
The invalid token which triggered the error.
Instance Method Summary collapse
-
#initialize(message, **options) ⇒ SyntaxError
constructor
Initializes a new syntax error instance.
Constructor Details
#initialize(message, **options) ⇒ SyntaxError
Initializes a new syntax error instance.
697 698 699 700 701 702 |
# File 'lib/rdf/turtle/reader.rb', line 697 def initialize(, **) @production = [:production] @token = [:token] @lineno = [:lineno] || (@token.lineno if @token.respond_to?(:lineno)) super(.to_s) end |
Instance Attribute Details
#lineno ⇒ Integer (readonly)
The line number where the error occurred.
687 688 689 |
# File 'lib/rdf/turtle/reader.rb', line 687 def lineno @lineno end |
#production ⇒ Symbol (readonly)
The current production.
675 676 677 |
# File 'lib/rdf/turtle/reader.rb', line 675 def production @production end |
#token ⇒ String (readonly)
The invalid token which triggered the error.
681 682 683 |
# File 'lib/rdf/turtle/reader.rb', line 681 def token @token end |