class Straightedge::Figures::Mark
a mark is an optionally-colored position
Attributes
location[RW]
Public Class Methods
empty(*xy)
click to toggle source
# File lib/straightedge/figures/mark.rb, line 20 def self.empty(*xy); new(*xy, color: :none) end
new(*xy, color: :white)
click to toggle source
# File lib/straightedge/figures/mark.rb, line 12 def initialize(*xy, color: :white) @location = xy # [xy[0], xy[1]] @color = color end
Public Instance Methods
x()
click to toggle source
# File lib/straightedge/figures/mark.rb, line 17 def x; @location[0] end
y()
click to toggle source
# File lib/straightedge/figures/mark.rb, line 18 def y; @location[1] end