Class: Racc::SourceText
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text, filename, lineno) ⇒ SourceText
constructor
A new instance of SourceText.
- #location ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(text, filename, lineno) ⇒ SourceText
Returns a new instance of SourceText.
15 16 17 18 19 |
# File 'lib/racc/sourcetext.rb', line 15 def initialize(text, filename, lineno) @text = text @filename = filename @lineno = lineno end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
22 23 24 |
# File 'lib/racc/sourcetext.rb', line 22 def filename @filename end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
23 24 25 |
# File 'lib/racc/sourcetext.rb', line 23 def lineno @lineno end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
21 22 23 |
# File 'lib/racc/sourcetext.rb', line 21 def text @text end |