Class: Algebrick::Matchers::Many

Inherits:
Abstract show all
Defined in:
lib/algebrick/matchers/many.rb

Instance Attribute Summary

Attributes inherited from Abstract

#value

Instance Method Summary collapse

Methods inherited from Abstract

#!, #&, #===, #>, #assign!, #assign?, #assign_to_s, #assigned?, #assigns, #case, #children_including_self, #initialize, #inspect, #matched?, #to_a, #|

Methods included from TypeCheck

#Child!, #Child?, #Match!, #Match?, #Type!, #Type?

Constructor Details

This class inherits a constructor from Algebrick::Matchers::Abstract

Instance Method Details

#==(other) ⇒ Object



26
27
28
# File 'lib/algebrick/matchers/many.rb', line 26

def ==(other)
  other.kind_of? self.class
end

#childrenObject



18
19
20
# File 'lib/algebrick/matchers/many.rb', line 18

def children
  []
end

#to_sObject



22
23
24
# File 'lib/algebrick/matchers/many.rb', line 22

def to_s
  "*#{assign_to_s}any"
end