Sha256: bb305b1d9ceb5e7b9fae657660f7945b870ef98c5a81138c0ffe964652402642
Contents?: true
Size: 406 Bytes
Versions: 22
Compression:
Stored size: 406 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 ==(other) other.is_a?(self.class) && klass == other.klass end alias :eql? :== def inspect "is_a(#{klass})" end end end end
Version data entries
22 entries across 22 versions & 1 rubygems