Class: Antlr4::Runtime::TextChunk
- Inherits:
-
Object
- Object
- Antlr4::Runtime::TextChunk
- Defined in:
- lib/antlr4/runtime/text_chunk.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(text) ⇒ TextChunk
constructor
A new instance of TextChunk.
- #to_s ⇒ Object
Constructor Details
#initialize(text) ⇒ TextChunk
Returns a new instance of TextChunk.
6 7 8 9 10 |
# File 'lib/antlr4/runtime/text_chunk.rb', line 6 def initialize(text) raise IllegalArgumentException, 'text cannot be null' if text.nil? @text = text end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
4 5 6 |
# File 'lib/antlr4/runtime/text_chunk.rb', line 4 def text @text end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/antlr4/runtime/text_chunk.rb', line 12 def to_s "'" + @text + "'" end |