module Pulo::Figure2D

Attributes

area[R]
perimeter[R]

Public Instance Methods

*(other) click to toggle source
# File lib/pulo/figure/figure2d.rb, line 7
def * (other)
  if other.is_a?(Length)
    raise "No extrusion figure known for #{self.class}" unless self.respond_to?(:extrusion_figure)
    self.extrusion_figure.new(face: self, length: other)
  else
    raise "Dont know how to multiply a #{self.class} by a #{other.class}"
  end
end