Sha256: c46a758d7da7daf391e06a89e539803e4567fbb6085fc213701f8f5da3721f1c

Contents?: true

Size: 276 Bytes

Versions: 1

Compression:

Stored size: 276 Bytes

Contents

module IdentityParade
  module Matchers
    # This matcher checks the similarity of booleans
    class BooleanMatcher < Matcher
      def score
        return 0 unless [TrueClass, FalseClass].include?(@right.class)

        @left == @right ? 1 : 0
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
identity_parade-0.1.1 lib/identity_parade/matchers/boolean_matcher.rb