Sha256: eb75c98660059f93fca78e2790ff9322a04af95a84ac6d50b72d2ba136ee5d2b

Contents?: true

Size: 518 Bytes

Versions: 1

Compression:

Stored size: 518 Bytes

Contents

module Fix
  class BaseMatcher
    def initialize expected
      @expected = expected
    end

    def matches? actual
      match? @expected, actual
    end
  end

  class Equal < BaseMatcher

  private

    def match? expected, actual
      actual.equal? expected
    end
  end

  class Eql < BaseMatcher

  private

    def match? expected, actual
      actual.eql? expected
    end
  end

  class Match < BaseMatcher

  private

    def match? expected, actual
      !actual.match(expected).nil?
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fix-0.0.1.pre lib/fix/base_matcher.rb