Class: RuPov::Objects::FinitePatchPrimitives::Polygon

Inherits:
Base
  • Object
show all
Defined in:
lib/rupov.rb

Instance Attribute Summary

Attributes inherited from Base

#name

Instance Method Summary collapse

Methods inherited from Base

#<<, #to_s

Constructor Details

#initialize(points) {|_self| ... } ⇒ Polygon

Returns a new instance of Polygon.

Yields:

  • (_self)

Yield Parameters:



201
202
203
204
205
# File 'lib/rupov.rb', line 201

def initialize( points )
    super( 'polygon' )
    self << Methods::MultiValue.new( [points.length]+points )
    yield(self) if block_given? and self.class == Polygon
end