Sha256: 27ae5b9822fac2f47802c0be7ef9779307996ff9d73be2096d04efe3d6489c34

Contents?: true

Size: 566 Bytes

Versions: 5

Compression:

Stored size: 566 Bytes

Contents

#encoding: utf-8

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

        warning_unsupported_exceptions
      end

      # Check the keywords with the data
      #
      # @return [Boolean]
      #   The result of the check
      def success?
        return true if @keywords.to_a == @data

        false
      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/is_equal.rb
the_array_comparator-0.4.0 lib/the_array_comparator/searching_strategies/is_equal.rb
the_array_comparator-0.3.4 lib/the_array_comparator/searching_strategies/is_equal.rb
the_array_comparator-0.3.1 lib/the_array_comparator/searching_strategies/is_equal.rb
the_array_comparator-0.3.0 lib/the_array_comparator/searching_strategies/is_equal.rb