Class: Overlap::Union
- Inherits:
-
Object
- Object
- Overlap::Union
- Defined in:
- lib/overlap/union.rb
Instance Attribute Summary collapse
-
#intersection_quantity ⇒ Object
readonly
Returns the value of attribute intersection_quantity.
-
#intersections ⇒ Object
readonly
Returns the value of attribute intersections.
-
#quantity ⇒ Object
readonly
Returns the value of attribute quantity.
-
#quantity_with_intersections ⇒ Object
readonly
Returns the value of attribute quantity_with_intersections.
-
#segment ⇒ Object
readonly
Returns the value of attribute segment.
-
#segments ⇒ Object
readonly
Returns the value of attribute segments.
Instance Method Summary collapse
-
#initialize(overlapped_segments) ⇒ Union
constructor
A new instance of Union.
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_quantity ⇒ Object (readonly)
Returns the value of attribute intersection_quantity.
4 5 6 |
# File 'lib/overlap/union.rb', line 4 def intersection_quantity @intersection_quantity end |
#intersections ⇒ Object (readonly)
Returns the value of attribute intersections.
4 5 6 |
# File 'lib/overlap/union.rb', line 4 def intersections @intersections end |
#quantity ⇒ Object (readonly)
Returns the value of attribute quantity.
4 5 6 |
# File 'lib/overlap/union.rb', line 4 def quantity @quantity end |
#quantity_with_intersections ⇒ Object (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 |
#segment ⇒ Object (readonly)
Returns the value of attribute segment.
4 5 6 |
# File 'lib/overlap/union.rb', line 4 def segment @segment end |
#segments ⇒ Object (readonly)
Returns the value of attribute segments.
4 5 6 |
# File 'lib/overlap/union.rb', line 4 def segments @segments end |