Class: Polygon
- Inherits:
-
Object
- Object
- Polygon
- Defined in:
- lib/rcad.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#paths ⇒ Object
readonly
Returns the value of attribute paths.
-
#points ⇒ Object
readonly
Returns the value of attribute points.
Instance Method Summary collapse
-
#initialize(points, paths = nil) ⇒ Polygon
constructor
A new instance of Polygon.
Constructor Details
#initialize(points, paths = nil) ⇒ Polygon
Returns a new instance of Polygon.
215 216 217 218 |
# File 'lib/rcad.rb', line 215 def initialize(points, paths=nil) @points = points @paths = paths || [(0...points.size).to_a] end |
Instance Attribute Details
#paths ⇒ Object (readonly)
Returns the value of attribute paths.
213 214 215 |
# File 'lib/rcad.rb', line 213 def paths @paths end |
#points ⇒ Object (readonly)
Returns the value of attribute points.
213 214 215 |
# File 'lib/rcad.rb', line 213 def points @points end |