Class: TheArrayComparator::SearchingStrategies::ContainsNot
- Defined in:
- lib/the_array_comparator/searching_strategies/contains_not.rb
Overview
strategy contains
Instance Method Summary collapse
-
#initialize(sample = Sample.new) ⇒ ContainsNot
constructor
Create a new instance of strategy.
-
#success? ⇒ Boolean
Check the keywords with the data.
Constructor Details
#initialize(sample = Sample.new) ⇒ ContainsNot
Create a new instance of strategy
13 14 15 |
# File 'lib/the_array_comparator/searching_strategies/contains_not.rb', line 13 def initialize(sample=Sample.new) super end |
Instance Method Details
#success? ⇒ Boolean
Check the keywords with the data
21 22 23 24 25 26 27 28 29 |
# File 'lib/the_array_comparator/searching_strategies/contains_not.rb', line 21 def success? return false if @keywords.blank? and @data.blank? if ( @keywords & @data ).blank? return true else return false end end |