class Atomy::Grammar::AST::Block

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/atomy/node/equality.rb, line 81
def ==(other)
  super || other.is_a?(self.class) && @nodes == other.nodes
end
construct(gen) click to toggle source
# File lib/atomy/node/constructable.rb, line 120
def construct(gen)
  push_node(gen, :Block)
  @nodes.each do |node|
    node.construct(gen)
  end
  gen.make_array(@nodes.size)
  gen.send(:new, 1)
end
each_child() { |:nodes, nodes| ... } click to toggle source
# File lib/atomy/node/meta.rb, line 160
def each_child
  yield :nodes, @nodes
end
through() { |n| ... } click to toggle source
# File lib/atomy/node/meta.rb, line 164
def through
  self.class.new(@nodes.collect { |n| yield n })
end
to_s() click to toggle source
# File lib/atomy/node/pretty.rb, line 76
def to_s
  if @nodes.empty?
    "{}"
  else
    "{ #{@nodes.join(", ")} }"
  end
end