Sha256: a21c99a53c02d4dd8991b5f72ad5910382abc87e0027e0a55e7ff4d153c93bc9

Contents?: true

Size: 422 Bytes

Versions: 62

Compression:

Stored size: 422 Bytes

Contents

module RR
  module WildcardMatchers
    class Boolean
      def wildcard_match?(other)
        self == other || is_a_boolean?(other)
      end

      def ==(other)
        other.is_a?(self.class)
      end
      alias_method :eql?, :==

      def inspect
        'boolean'
      end

      protected
      def is_a_boolean?(subject)
        subject.is_a?(TrueClass) || subject.is_a?(FalseClass)
      end
    end
  end
end

Version data entries

62 entries across 58 versions & 9 rubygems

Version Path
rr-0.10.10 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.9 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.8 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.7 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.6 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.5 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.4 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.2 lib/rr/wildcard_matchers/boolean.rb
redinger-rr-0.10.3 lib/rr/wildcard_matchers/boolean.rb
rr-0.10.0 lib/rr/wildcard_matchers/boolean.rb
rr-0.4.8 lib/rr/wildcard_matchers/boolean.rb
rr-0.4.9 lib/rr/wildcard_matchers/boolean.rb
rr-0.6.0 lib/rr/wildcard_matchers/boolean.rb
rr-0.4.10 lib/rr/wildcard_matchers/boolean.rb
rr-0.7.0 lib/rr/wildcard_matchers/boolean.rb
rr-0.4.5 lib/rr/wildcard_matchers/boolean.rb
rr-0.9.0 lib/rr/wildcard_matchers/boolean.rb
rr-0.4.7 lib/rr/wildcard_matchers/boolean.rb
rr-0.4.6 lib/rr/wildcard_matchers/boolean.rb
rr-0.8.1 lib/rr/wildcard_matchers/boolean.rb