Class: Rubber::ThreadSafeProxy
- Inherits:
-
Object
- Object
- Rubber::ThreadSafeProxy
- Defined in:
- lib/rubber/thread_safe_proxy.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ ThreadSafeProxy
constructor
A new instance of ThreadSafeProxy.
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 |