A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://ruby-syntax-tree.github.io/syntax_tree/SyntaxTree/Undef.html below:

class SyntaxTree::Undef - RDoc Documentation

  1. SyntaxTree::
  2. Undef
class SyntaxTree::Undef

Undef represents the use of the undef keyword.

undef method
Attributes Public Class Methods

Source

def initialize(symbols:, location:)
  @symbols = symbols
  @location = location
  @comments = []
end
Public Instance Methods

Source

def ===(other)
  other.is_a?(Undef) && ArrayMatch.call(symbols, other.symbols)
end

Source

def accept(visitor)
  visitor.visit_undef(self)
end

Source

def child_nodes
  symbols
end

Source

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

Source

def deconstruct_keys(_keys)
  { symbols: symbols, location: location, comments: comments }
end

Source

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4