Class: Contrek::Concurrent::Shape
- Inherits:
-
Object
- Object
- Contrek::Concurrent::Shape
- Defined in:
- lib/contrek/finder/concurrent/shape.rb
Instance Attribute Summary collapse
-
#children_shapes ⇒ Object
readonly
Returns the value of attribute children_shapes.
-
#inner_polylines ⇒ Object
Returns the value of attribute inner_polylines.
-
#merged_to_shape ⇒ Object
Returns the value of attribute merged_to_shape.
-
#outer_polyline ⇒ Object
Returns the value of attribute outer_polyline.
-
#parent_inner_polyline ⇒ Object
Returns the value of attribute parent_inner_polyline.
-
#parent_shape ⇒ Object
readonly
Returns the value of attribute parent_shape.
-
#reassociation_skip ⇒ Object
Returns the value of attribute reassociation_skip.
Class Method Summary collapse
Instance Method Summary collapse
- #clear_inner! ⇒ Object
- #info ⇒ Object
-
#initialize ⇒ Shape
constructor
A new instance of Shape.
- #set_parent_shape(shape) ⇒ Object
Constructor Details
#initialize ⇒ Shape
Returns a new instance of Shape.
8 9 10 11 12 13 14 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 8 def initialize @parent_shape = nil @merged_to_shape = nil @parent_inner_polyline = nil @children_shapes = [] @reassociation_skip = false end |
Instance Attribute Details
#children_shapes ⇒ Object (readonly)
Returns the value of attribute children_shapes.
6 7 8 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 6 def children_shapes @children_shapes end |
#inner_polylines ⇒ Object
Returns the value of attribute inner_polylines.
4 5 6 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 4 def inner_polylines @inner_polylines end |
#merged_to_shape ⇒ Object
Returns the value of attribute merged_to_shape.
4 5 6 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 4 def merged_to_shape @merged_to_shape end |
#outer_polyline ⇒ Object
Returns the value of attribute outer_polyline.
4 5 6 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 4 def outer_polyline @outer_polyline end |
#parent_inner_polyline ⇒ Object
Returns the value of attribute parent_inner_polyline.
4 5 6 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 4 def parent_inner_polyline @parent_inner_polyline end |
#parent_shape ⇒ Object (readonly)
Returns the value of attribute parent_shape.
6 7 8 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 6 def parent_shape @parent_shape end |
#reassociation_skip ⇒ Object
Returns the value of attribute reassociation_skip.
4 5 6 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 4 def reassociation_skip @reassociation_skip end |
Class Method Details
Instance Method Details
#clear_inner! ⇒ Object
23 24 25 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 23 def clear_inner! @inner_polylines.clear end |
#info ⇒ Object
33 34 35 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 33 def info "Shape (outer_polyline = #{outer_polyline.named}, children count = #{@children_shapes.size}" end |
#set_parent_shape(shape) ⇒ Object
27 28 29 30 31 |
# File 'lib/contrek/finder/concurrent/shape.rb', line 27 def set_parent_shape(shape) @parent_shape&.children_shapes&.delete(self) @parent_shape = shape shape.children_shapes << self if shape end |