class Atomy::Grammar::AST::Word

Public Instance Methods

==(other) click to toggle source
Calls superclass method
# File lib/atomy/node/equality.rb, line 50
def ==(other)
  super || other.is_a?(self.class) && @text == other.text
end
construct(gen) click to toggle source
# File lib/atomy/node/constructable.rb, line 80
def construct(gen)
  push_node(gen, :Word)
  gen.push_literal(@text)
  gen.send(:new, 1)
end
each_attribute() { |:text, text| ... } click to toggle source
# File lib/atomy/node/meta.rb, line 111
def each_attribute
  yield :text, @text
end
to_s() click to toggle source
# File lib/atomy/node/pretty.rb, line 47
def to_s
  word = @text.to_s
  word[0] + word[1..-1].tr("_", "-")
end