Class: VectorSalad::ShapeProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/vector_salad/shape_proxy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#shapeObject (readonly)

Returns the value of attribute shape.



3
4
5
# File 'lib/vector_salad/shape_proxy.rb', line 3

def shape
  @shape
end