Module: Actor::Module::Handler::Macro

Defined in:
lib/actor/module/handler/macro.rb

Instance Method Summary collapse

Instance Method Details

#handle(message_pattern, &handler) ⇒ Object



5
6
7
8
9
# File 'lib/actor/module/handler/macro.rb', line 5

def handle message_pattern, &handler
  method_name = MethodName.get message_pattern

  define_method method_name, &handler
end