Sha256: 1741ce750cfa244f6a83df2cf9f73946a980c1cc730f05261f6ac8a1d92bc82d
Contents?: true
Size: 393 Bytes
Versions: 1
Compression:
Stored size: 393 Bytes
Contents
module Matchi # **Identity** matcher. class Equal < BasicObject def initialize(expected) @expected = expected end # @example Is it equal to :foo? # equal = Matchi::Equal.new(:foo) # equal.matches? { :foo } # => true # # @return [Boolean] Comparison between actual and expected values. def matches? @expected.equal?(yield) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
matchi-0.0.3 | lib/matchi/equal.rb |