Sha256: ace8631d2c2e7133716eff0012ffbf0665918f947a0f930c0e7c02caead00768

Contents?: true

Size: 637 Bytes

Versions: 5

Compression:

Stored size: 637 Bytes

Contents

#encoding: utf-8

# the main module
module TheArrayComparator
  # the available strategies
  module SearchingStrategies
    #strategy contains
    class ContainsNot < Base
      
      # Create a new instance of strategy
      #
      # @see Base
      def initialize(sample=Sample.new)
        super
      end

      # Check the keywords with the data
      #
      # @return [Boolean]
      #   The result of the check
      def success?
        return false if @keywords.blank? and @data.blank?

        if ( @keywords & @data ).blank?
          return true
        else
          return false
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
the_array_comparator-0.5.0 lib/the_array_comparator/searching_strategies/contains_not.rb
the_array_comparator-0.4.0 lib/the_array_comparator/searching_strategies/contains_not.rb
the_array_comparator-0.3.4 lib/the_array_comparator/searching_strategies/contains_not.rb
the_array_comparator-0.3.1 lib/the_array_comparator/searching_strategies/contains_not.rb
the_array_comparator-0.3.0 lib/the_array_comparator/searching_strategies/contains_not.rb