Sha256: c2b501ff253919e8a5a6b0e72271612a63d76a8afeefbf27df04ae1f8913d708

Contents?: true

Size: 557 Bytes

Versions: 2

Compression:

Stored size: 557 Bytes

Contents

#encoding: utf-8

# the main module
module TheArrayComparator
  # the available strategies
  module Strategies
    #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

2 entries across 2 versions & 1 rubygems

Version Path
the_array_comparator-0.2.0 lib/the_array_comparator/strategies/is_equal.rb
the_array_comparator-0.1.1 lib/the_array_comparator/strategies/is_equal.rb