Class: EightCorner::Figure
- Inherits:
-
Object
- Object
- EightCorner::Figure
- Defined in:
- lib/eight_corner/figure.rb
Overview
a Figure is 8 connected points
Instance Attribute Summary collapse
-
#points ⇒ Object
Returns the value of attribute points.
Instance Method Summary collapse
-
#initialize ⇒ Figure
constructor
A new instance of Figure.
-
#potential ⇒ Object
an overall potential based on the points in this figure for use as an input for another Base#plot.
Constructor Details
#initialize ⇒ Figure
Returns a new instance of Figure.
7 8 9 |
# File 'lib/eight_corner/figure.rb', line 7 def initialize @points = [] end |
Instance Attribute Details
#points ⇒ Object
Returns the value of attribute points.
6 7 8 |
# File 'lib/eight_corner/figure.rb', line 6 def points @points end |
Instance Method Details
#potential ⇒ Object
an overall potential based on the points in this figure for use as an input for another Base#plot
13 14 15 |
# File 'lib/eight_corner/figure.rb', line 13 def potential points.last.potential end |