Module: Kernel
- Defined in:
- lib/kernel.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.new(*args) ⇒ Object
13 14 15 16 17 |
# File 'lib/kernel.rb', line 13 def self.new(*args) obj = allocate obj.send(:initialize, *args) proxy_for obj, @proxy_machine_config.callbacks end |
Instance Method Details
#auto_proxy(&block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/kernel.rb', line 9 def auto_proxy &block @proxy_machine_config = ProxyMachine::Config.new @proxy_machine_config.apply!(&block) def self.new(*args) obj = allocate obj.send(:initialize, *args) proxy_for obj, @proxy_machine_config.callbacks end end |
#proxy_for(object, callbacks = nil) ⇒ Object
5 6 7 |
# File 'lib/kernel.rb', line 5 def proxy_for object, callbacks = nil ProxyMachine::Proxy.new object, callbacks end |