Class: TreeClusters::AttrArray

Inherits:
Object::Array
  • Object
show all
Defined in:
lib/tree_clusters.rb

Overview

Provides convenience methods for working with Arrays of Sets

Instance Method Summary collapse

Instance Method Details

#intersectionSet

Takes the intersection of all sets in the AttrArray

Returns:

  • (Set)


272
273
274
# File 'lib/tree_clusters.rb', line 272

def intersection
  self.reduce(&:intersection)
end

#unionSet

Takes the union of all sets in the AttrArray

Returns:

  • (Set)


265
266
267
# File 'lib/tree_clusters.rb', line 265

def union
  self.reduce(&:union)
end