Class: Laurel::Proxy

Inherits:
BasicObject
Defined in:
lib/laurel/proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Proxy

Returns a new instance of Proxy.



3
4
5
# File 'lib/laurel/proxy.rb', line 3

def initialize &block
	@block = block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



7
8
9
# File 'lib/laurel/proxy.rb', line 7

def method_missing name, *args, &block
	@block.call name, *args, &block
end