Class: Algebrick::Matchers::Atom
Instance Attribute Summary
Attributes inherited from Wrapper
Attributes inherited from Abstract
Instance Method Summary (collapse)
-
- (Atom) initialize(something)
constructor
A new instance of Atom.
-
- (Object) to_s
Methods inherited from Wrapper
#==, call, #children, #matching?
Methods inherited from Abstract
#!, #&, #==, #===, #>, #assign!, #assign?, #assign_to_s, #assigned?, #assigns, #case, #children, #children_including_self, #collect_assigns, #find_children, #inspect, #matchable!, #matched?, #matching?, #to_a, #|
Methods included from TypeCheck
#Child!, #Child?, #Match!, #Match?, #Type!, #Type?, error
Constructor Details
- (Atom) initialize(something)
Returns a new instance of Atom
18 19 20 21 |
# File 'lib/algebrick/matchers/atom.rb', line 18 def initialize(something) Type! something, Algebrick::Atom super something end |
Instance Method Details
- (Object) to_s
23 24 25 |
# File 'lib/algebrick/matchers/atom.rb', line 23 def to_s assign_to_s + "#{@something.name}.to_m" end |