Class: Yap::Shell::Parser::Nodes::CommentNode

Inherits:
Object
  • Object
show all
Includes:
Visitor
Defined in:
lib/yap/shell/parser/nodes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Visitor

#accept

Constructor Details

#initialize(text) ⇒ CommentNode

Returns a new instance of CommentNode.



92
93
94
# File 'lib/yap/shell/parser/nodes.rb', line 92

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



90
91
92
# File 'lib/yap/shell/parser/nodes.rb', line 90

def text
  @text
end

Instance Method Details

#inspectObject



96
97
98
# File 'lib/yap/shell/parser/nodes.rb', line 96

def inspect
  to_s
end

#to_sObject



100
101
102
# File 'lib/yap/shell/parser/nodes.rb', line 100

def to_s
  "CommentNode(#{@text})"
end