Class: Brita::SubsetComparator

Inherits:
Object
  • Object
show all
Defined in:
lib/brita/subset_comparator.rb

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ SubsetComparator

Returns a new instance of SubsetComparator.



3
4
5
# File 'lib/brita/subset_comparator.rb', line 3

def initialize(array)
  @array = array
end

Instance Method Details

#include?(other) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/brita/subset_comparator.rb', line 7

def include?(other)
  @array.to_set >= other.to_set
end