Class: TheArrayComparator::SearchingStrategies::IsNotEqual

Inherits:
Base
  • Object
show all
Defined in:
lib/the_array_comparator/searching_strategies/is_not_equal.rb

Overview

strategy is not equal

Instance Method Summary collapse

Constructor Details

#initialize(sample = Sample.new) ⇒ IsNotEqual

Create a new instance of strategy

See Also:



13
14
15
16
17
# File 'lib/the_array_comparator/searching_strategies/is_not_equal.rb', line 13

def initialize(sample=Sample.new)
  super

  warning_unsupported_exceptions
end

Instance Method Details

#success?Boolean

Check the keywords with the data

Returns:

  • (Boolean)

    The result of the check



23
24
25
26
27
# File 'lib/the_array_comparator/searching_strategies/is_not_equal.rb', line 23

def success?
  return true if @keywords.to_a != @data

  false
end