Class: EightCorner::Figure

Inherits:
Object
  • Object
show all
Defined in:
lib/eight_corner/figure.rb

Overview

a Figure is 8 connected points

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFigure

Returns a new instance of Figure.



7
8
9
# File 'lib/eight_corner/figure.rb', line 7

def initialize
  @points = []
end

Instance Attribute Details

#pointsObject

Returns the value of attribute points.



6
7
8
# File 'lib/eight_corner/figure.rb', line 6

def points
  @points
end

Instance Method Details

#potentialObject

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