Sha256: f616ceaafc030e4916844e4e5912c70c084239ea9c58d1e191e62f164d141507
Contents?: true
Size: 546 Bytes
Versions: 59
Compression:
Stored size: 546 Bytes
Contents
module RR module WildcardMatchers class Satisfy attr_reader :expectation_proc def initialize(expectation_proc) @expectation_proc = expectation_proc end def wildcard_match?(other) return true if self == other !!expectation_proc.call(other) end def inspect "satisfy {block}" end def ==(other) return false unless other.is_a?(self.class) self.expectation_proc == other.expectation_proc end alias_method :eql?, :== end end end
Version data entries
59 entries across 55 versions & 9 rubygems