Sha256: 54c99ed2d4df1590d72302e1468d7850ad77f09367ff5053972d4ea22bd93243
Contents?: true
Size: 924 Bytes
Versions: 8
Compression:
Stored size: 924 Bytes
Contents
module Erlectricity class Condition def self.for(a) case a when Condition then a when Class then TypeCondition.new(a) else StaticCondition.new(a) end end def initialize end def binding_for(arg) nil end def satisfies?(arg) false end alias === satisfies? end module Conditions def atom TypeCondition.new(Symbol) end def any TypeCondition.new(Object) end def number TypeCondition.new(Fixnum) end def pid TypeCondition.new(Erlectricity::Pid) end def ref TypeCondition.new(Erlectricity::NewReference) end def string TypeCondition.new(String) end def list TypeCondition.new(Array) end def hash HashCondition.new() end def boolean BooleanCondition.new() end end extend Conditions end Any = Object
Version data entries
8 entries across 8 versions & 3 rubygems