Class: VectorSalad::StandardShapes::Move
- Defined in:
- lib/vector_salad/standard_shapes/move.rb
Instance Method Summary collapse
-
#initialize(x, y, canvas:, **_options, &block) ⇒ Move
constructor
A new instance of Move.
Methods inherited from Transform
Methods included from DSL
Constructor Details
#initialize(x, y, canvas:, **_options, &block) ⇒ Move
Returns a new instance of Move.
15 16 17 18 19 20 21 |
# File 'lib/vector_salad/standard_shapes/move.rb', line 15 def initialize(x, y, canvas:, **, &block) instance_eval(&block) # inner_canvas is populated @canvas.each do |shape| canvas << shape.move(x, y) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class VectorSalad::DSL