Class: Parallizer::MethodCallNotifier

Inherits:
Object
  • Object
show all
Defined in:
lib/parallizer/method_call_notifier.rb

Instance Method Summary collapse

Constructor Details

#initialize(&callback) ⇒ MethodCallNotifier

Returns a new instance of MethodCallNotifier.



5
6
7
8
# File 'lib/parallizer/method_call_notifier.rb', line 5

def initialize(&callback)
  @callback = callback
  
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



10
11
12
13
# File 'lib/parallizer/method_call_notifier.rb', line 10

def method_missing(name, *arguments, &block)
  @callback.call(name, *arguments)
  self
end