Class: Polygon::Shape
- Inherits:
-
Object
- Object
- Polygon::Shape
- Defined in:
- lib/polygon/shape.rb
Overview
A polygon shape built by any number of points
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
Instance Method Summary collapse
-
#initialize(points) ⇒ Shape
constructor
A new instance of Shape.
Constructor Details
#initialize(points) ⇒ Shape
Returns a new instance of Shape.
8 9 10 |
# File 'lib/polygon/shape.rb', line 8 def initialize(points) self.points = points end |
Instance Attribute Details
#points ⇒ Object
Returns the value of attribute points.
6 7 8 |
# File 'lib/polygon/shape.rb', line 6 def points @points end |