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
adva-0.3.2 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.3.1 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.3.0 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.2.4 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.2.3 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.2.2 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.2.1 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.2.0 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.1.4 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.1.3 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.1.2 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.1.1 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.1.0 test/rr/lib/rr/wildcard_matchers/boolean.rb
adva-0.0.1 test/rr/lib/rr/wildcard_matchers/boolean.rb
jferris-rr-0.7.1.0.1239654108 lib/rr/wildcard_matchers/boolean.rb
redinger-redinger-rr-0.10.3 lib/rr/wildcard_matchers/boolean.rb
redinger-rr-0.10.4 lib/rr/wildcard_matchers/boolean.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.1/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/wildcard_matchers/boolean.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/bitclust-core-0.5.3/vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/wildcard_matchers/boolean.rb
bitclust-core-0.5.3 vendor/bundle/ruby/1.9.1/gems/rr-1.0.4/lib/rr/wildcard_matchers/boolean.rb