class SyntaxTree::XString
XString represents the contents of an XStringLiteral.
`ls`
Attributes
- Array[
StringEmbExpr|StringDVar|TStringContent] -
the parts of the
xstring
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 12203 def initialize(parts:, location:) @parts = parts @location = location end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 12229 def ===(other) other.is_a?(XString) && ArrayMatch.call(parts, other.parts) end
Source
# File lib/syntax_tree/node.rb, line 12208 def accept(visitor) visitor.visit_xstring(self) end
Source
# File lib/syntax_tree/node.rb, line 12212 def child_nodes parts end
Also aliased as: deconstruct
Source
# File lib/syntax_tree/node.rb, line 12216 def copy(parts: nil, location: nil) XString.new( parts: parts || self.parts, location: location || self.location ) end
Source
# File lib/syntax_tree/node.rb, line 12225 def deconstruct_keys(_keys) { parts: parts, location: location } end