class Algebrick::Atom
Representation of Atomic types
Public Class Methods
new(name, &block)
click to toggle source
Calls superclass method
# File lib/algebrick/atom.rb, line 20 def initialize(name, &block) super name, &block extend self end
Public Instance Methods
==(other)
click to toggle source
# File lib/algebrick/atom.rb, line 33 def ==(other) self.equal? other end
be_kind_of(type)
click to toggle source
# File lib/algebrick/atom.rb, line 29 def be_kind_of(type) extend type end
pretty_print(q)
click to toggle source
# File lib/algebrick/atom.rb, line 45 def pretty_print(q) q.text to_s end
to_m()
click to toggle source
# File lib/algebrick/atom.rb, line 25 def to_m Matchers::Atom.new self end
to_s()
click to toggle source
# File lib/algebrick/atom.rb, line 41 def to_s name || 'nameless-atom' end
type()
click to toggle source
# File lib/algebrick/atom.rb, line 37 def type self end