Class: Expo::Proxy
- Inherits:
-
Object
- Object
- Expo::Proxy
- Defined in:
- lib/expo.rb
Instance Method Summary collapse
-
#initialize(*objects) ⇒ Proxy
constructor
A new instance of Proxy.
- #method_missing(method, *args, &block) ⇒ Object
Constructor Details
#initialize(*objects) ⇒ Proxy
Returns a new instance of Proxy.
160 161 162 |
# File 'lib/expo.rb', line 160 def initialize(*objects) @objects = objects end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object
164 165 166 167 168 |
# File 'lib/expo.rb', line 164 def method_missing(method, *args, &block) @objects.detect{|obj| obj.respond_to? method}.send( method, *args, &block ) end |