Sha256: 4ed4dc23f8df476d8ebd36a907531cfa6803fe6d5138c111a684dda276c638f7
Contents?: true
Size: 443 Bytes
Versions: 65
Compression:
Stored size: 443 Bytes
Contents
module RR module WildcardMatchers class IsA attr_reader :klass def initialize(klass) @klass = klass end def wildcard_match?(other) self == other || other.is_a?(klass) end def inspect "is_a(#{klass})" end def ==(other) return false unless other.is_a?(self.class) self.klass == other.klass end alias_method :eql?, :== end end end
Version data entries
65 entries across 61 versions & 9 rubygems