Class: Overlap::Union

Inherits:
Object
  • Object
show all
Defined in:
lib/overlap/union.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(overlapped_segments) ⇒ Union



6
7
8
9
10
# File 'lib/overlap/union.rb', line 6

def initialize(overlapped_segments)
  @overlapped_segments = overlapped_segments
  @segments = overlapped_segments[:segments].sort
  build!
end

Instance Attribute Details

#intersection_quantityObject (readonly)

Returns the value of attribute intersection_quantity.



4
5
6
# File 'lib/overlap/union.rb', line 4

def intersection_quantity
  @intersection_quantity
end

#intersectionsObject (readonly)

Returns the value of attribute intersections.



4
5
6
# File 'lib/overlap/union.rb', line 4

def intersections
  @intersections
end

#quantityObject (readonly)

Returns the value of attribute quantity.



4
5
6
# File 'lib/overlap/union.rb', line 4

def quantity
  @quantity
end

#quantity_with_intersectionsObject (readonly)

Returns the value of attribute quantity_with_intersections.



4
5
6
# File 'lib/overlap/union.rb', line 4

def quantity_with_intersections
  @quantity_with_intersections
end

#segmentObject (readonly)

Returns the value of attribute segment.



4
5
6
# File 'lib/overlap/union.rb', line 4

def segment
  @segment
end

#segmentsObject (readonly)

Returns the value of attribute segments.



4
5
6
# File 'lib/overlap/union.rb', line 4

def segments
  @segments
end