Class: TreeClusters::AttrArray
- Inherits:
-
Object::Array
- Object
- Object::Array
- TreeClusters::AttrArray
- Defined in:
- lib/tree_clusters/attr_array.rb
Overview
Provides convenience methods for working with Arrays of Sets
Instance Method Summary collapse
-
#intersection ⇒ Set
Takes the intersection of all sets in the AttrArray.
-
#union ⇒ Set
Takes the union of all sets in the AttrArray.
Instance Method Details
#intersection ⇒ Set
Takes the intersection of all sets in the AttrArray
14 15 16 |
# File 'lib/tree_clusters/attr_array.rb', line 14 def intersection self.reduce(&:intersection) end |
#union ⇒ Set
Takes the union of all sets in the AttrArray
7 8 9 |
# File 'lib/tree_clusters/attr_array.rb', line 7 def union self.reduce(&:union) end |