class SyntaxTree::EmbDoc
EmbDoc
represents a multi-line comment.
=begin
first line
second line
=end
Attributes
- String
-
the contents of the comment
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 4974 def initialize(value:, location:) @value = value @location = location @leading = false @trailing = false end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 5042 def ===(other) other.is_a?(EmbDoc) && value === other.value end
Source
# File lib/syntax_tree/node.rb, line 5010 def accept(visitor) visitor.visit_embdoc(self) end
Source
# File lib/syntax_tree/node.rb, line 5014 def child_nodes [] end
Also aliased as: deconstruct
Source
# File lib/syntax_tree/node.rb, line 5018 def copy(value: nil, location: nil) EmbDoc.new( value: value || self.value, location: location || self.location ) end
Source
# File lib/syntax_tree/node.rb, line 5027 def deconstruct_keys(_keys) { value: value, location: location } end
Source
# File lib/syntax_tree/node.rb, line 5031 def format(q) if (q.parent.is_a?(DefNode) && q.parent.endless?) || q.parent.is_a?(Statements) q.trim else q.breakable_return end q.text(value) end