Class: Rubber::ThreadSafeProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/rubber/thread_safe_proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ ThreadSafeProxy

Returns a new instance of ThreadSafeProxy.



6
7
8
# File 'lib/rubber/thread_safe_proxy.rb', line 6

def initialize(&block)
  @target_block = block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



12
13
14
# File 'lib/rubber/thread_safe_proxy.rb', line 12

def method_missing(name, *args, &block)
  target.send(name, *args, &block)
end