Class: VectorSalad::ShapeProxy
- Inherits:
-
Object
- Object
- VectorSalad::ShapeProxy
- Defined in:
- lib/vector_salad/shape_proxy.rb
Instance Attribute Summary collapse
-
#shape ⇒ Object
readonly
Returns the value of attribute shape.
Instance Method Summary collapse
-
#initialize(shape) ⇒ ShapeProxy
constructor
A new instance of ShapeProxy.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(shape) ⇒ ShapeProxy
Returns a new instance of ShapeProxy.
5 6 7 |
# File 'lib/vector_salad/shape_proxy.rb', line 5 def initialize(shape) @shape = shape end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
9 10 11 12 |
# File 'lib/vector_salad/shape_proxy.rb', line 9 def method_missing(name, *args, &block) @shape = shape.send(name, *args, &block) self end |
Instance Attribute Details
#shape ⇒ Object (readonly)
Returns the value of attribute shape.
3 4 5 |
# File 'lib/vector_salad/shape_proxy.rb', line 3 def shape @shape end |