class Laser::Cutter::Geometry::Shape

Attributes

name[RW]
position[RW]

Public Instance Methods

move_to(new_point) click to toggle source
# File lib/laser-cutter/geometry/shape.rb, line 25
def move_to new_point
  self.position = new_point
  relocate!
  self
end
relocate!() click to toggle source

Implement in each shape to move to the new pointd

# File lib/laser-cutter/geometry/shape.rb, line 33
def relocate!
  raise 'Abstract method'
end
x() click to toggle source
# File lib/laser-cutter/geometry/shape.rb, line 14
def x
  position.x
end
x=(value) click to toggle source
# File lib/laser-cutter/geometry/shape.rb, line 11
def x= value
  position.x = value
end
y() click to toggle source
# File lib/laser-cutter/geometry/shape.rb, line 21
def y
  position.y
end
y=(value) click to toggle source
# File lib/laser-cutter/geometry/shape.rb, line 18
def y= value
  position.y = value
end