class SyntaxTree::Undef
undef method
Undef represents the use of the undef
keyword.
def ===(other)
def ===(other) other.is_a?(Undef) && ArrayMatch.call(symbols, other.symbols) end
def accept(visitor)
def accept(visitor) visitor.visit_undef(self) end
def child_nodes
def child_nodes symbols end
def copy(symbols: nil, location: nil)
def copy(symbols: nil, location: nil) node = Undef.new( symbols: symbols || self.symbols, location: location || self.location ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { symbols: symbols, location: location, comments: comments } end
def format(q)
def format(q) keyword = "undef " formatters = symbols.map { |symbol| UndefArgumentFormatter.new(symbol) } q.group do q.text(keyword) q.nest(keyword.length) do q.seplist(formatters) { |formatter| q.format(formatter) } end end end
def initialize(symbols:, location:)
def initialize(symbols:, location:) @symbols = symbols @location = location @comments = [] end