Class: DependencyInjection::ProxyObject

Inherits:
Object
  • Object
show all
Defined in:
lib/dependency_injection/proxy_object.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ProxyObject

Returns a new instance of ProxyObject.



3
4
5
# File 'lib/dependency_injection/proxy_object.rb', line 3

def initialize(&block)
  @object = block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method_name, *args) ⇒ Object



7
8
9
# File 'lib/dependency_injection/proxy_object.rb', line 7

def method_missing(method_name, *args)
  @object.call.send(method_name, *args)
end