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