Class: Brita::SubsetComparator
- Inherits:
-
Object
- Object
- Brita::SubsetComparator
- Defined in:
- lib/brita/subset_comparator.rb
Instance Method Summary collapse
- #include?(other) ⇒ Boolean
-
#initialize(array) ⇒ SubsetComparator
constructor
A new instance of SubsetComparator.
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
7 8 9 |
# File 'lib/brita/subset_comparator.rb', line 7 def include?(other) @array.to_set >= other.to_set end |