Class: Polygon::Shape

Inherits:
Object
  • Object
show all
Defined in:
lib/polygon/shape.rb

Overview

A polygon shape built by any number of points

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#pointsObject

Returns the value of attribute points.



6
7
8
# File 'lib/polygon/shape.rb', line 6

def points
  @points
end