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.
16 17 18 19 20 |
# File 'lib/racc/sourcetext.rb', line 16 def initialize(text, filename, lineno) @text = text @filename = filename @lineno = lineno end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
23 24 25 |
# File 'lib/racc/sourcetext.rb', line 23 def filename @filename end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
24 25 26 |
# File 'lib/racc/sourcetext.rb', line 24 def lineno @lineno end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
22 23 24 |
# File 'lib/racc/sourcetext.rb', line 22 def text @text end |