Class: ShapeBase
- Inherits:
-
Object
- Object
- ShapeBase
- Defined in:
- lib/shape_base.rb
Overview
file: shape_base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #draw(name, properties) ⇒ Object
-
#initialize(scale = 1) ⇒ ShapeBase
constructor
A new instance of ShapeBase.
Constructor Details
#initialize(scale = 1) ⇒ ShapeBase
Returns a new instance of ShapeBase.
7 8 9 10 |
# File 'lib/shape_base.rb', line 7 def initialize(scale=1) @shape = {} load_shapes() end |
Instance Method Details
#draw(name, properties) ⇒ Object
12 13 14 |
# File 'lib/shape_base.rb', line 12 def draw(name, properties) @shape[name].call(properties) end |