Class: TextChunk

Inherits:
Chunk show all
Defined in:
lib/antlr4/tree/Chunk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ TextChunk

Returns a new instance of TextChunk.



23
24
25
# File 'lib/antlr4/tree/Chunk.rb', line 23

def initialize(text) 
    self.text = text
end

Instance Attribute Details

#textObject

Returns the value of attribute text.



22
23
24
# File 'lib/antlr4/tree/Chunk.rb', line 22

def text
  @text
end

Instance Method Details

#to_sObject



27
28
29
# File 'lib/antlr4/tree/Chunk.rb', line 27

def to_s
    "'#{ self.text }'"
end