Sha256: 0813d77549f19265a93a22a2729a27ce6ee61505e9e8c39dbb342d616623e4f2

Contents?: true

Size: 336 Bytes

Versions: 2

Compression:

Stored size: 336 Bytes

Contents

module Expect
  module Matcher
    # Provides the implementation for `match`.
    class Match < BasicObject
      def initialize(expected)
        @expected = expected
      end

      # @return [Boolean] Comparison between actual and expected values.
      def matches?
        !@expected.match(yield).nil?
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
expect-0.0.2 lib/expect/matcher/match.rb
expect-0.0.1 lib/expect/matcher/match.rb