class SyntaxTree::ArgStar
Star represents using a splat operator on an expression.
method(*arguments)
Attributes
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 946 def initialize(value:, location:) @value = value @location = location @comments = [] end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 982 def ===(other) other.is_a?(ArgStar) && value === other.value end
Source
# File lib/syntax_tree/node.rb, line 952 def accept(visitor) visitor.visit_arg_star(self) end
Source
# File lib/syntax_tree/node.rb, line 956 def child_nodes [value] end
Also aliased as: deconstruct
Source
# File lib/syntax_tree/node.rb, line 960 def copy(value: nil, location: nil) node = ArgStar.new( value: value || self.value, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
Source
# File lib/syntax_tree/node.rb, line 973 def deconstruct_keys(_keys) { value: value, location: location, comments: comments } end
Source
# File lib/syntax_tree/node.rb, line 977 def format(q) q.text("*") q.format(value) if value end