Class: SyntaxTree::EmbDoc
Overview
EmbDoc represents a multi-line comment.
=begin
first line
second line
=end
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
- String
-
the contents of the comment.
Attributes inherited from Node
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
- #child_nodes ⇒ Object (also: #deconstruct)
- #comments ⇒ Object
- #deconstruct_keys(keys) ⇒ Object
- #format(q) ⇒ Object
- #ignore? ⇒ Boolean
-
#initialize(value:, location:) ⇒ EmbDoc
constructor
A new instance of EmbDoc.
- #inline? ⇒ Boolean
Methods inherited from Node
Constructor Details
#initialize(value:, location:) ⇒ EmbDoc
Returns a new instance of EmbDoc.
4073 4074 4075 4076 |
# File 'lib/syntax_tree/node.rb', line 4073 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#value ⇒ Object (readonly)
- String
-
the contents of the comment
4071 4072 4073 |
# File 'lib/syntax_tree/node.rb', line 4071 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
4090 4091 4092 |
# File 'lib/syntax_tree/node.rb', line 4090 def accept(visitor) visitor.visit_embdoc(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
4094 4095 4096 |
# File 'lib/syntax_tree/node.rb', line 4094 def child_nodes [] end |
#comments ⇒ Object
4086 4087 4088 |
# File 'lib/syntax_tree/node.rb', line 4086 def comments [] end |
#deconstruct_keys(keys) ⇒ Object
4100 4101 4102 |
# File 'lib/syntax_tree/node.rb', line 4100 def deconstruct_keys(keys) { value: value, location: location } end |
#format(q) ⇒ Object
4104 4105 4106 4107 |
# File 'lib/syntax_tree/node.rb', line 4104 def format(q) q.trim q.text(value) end |
#ignore? ⇒ Boolean
4082 4083 4084 |
# File 'lib/syntax_tree/node.rb', line 4082 def ignore? false end |
#inline? ⇒ Boolean
4078 4079 4080 |
# File 'lib/syntax_tree/node.rb', line 4078 def inline? false end |