123456789_123456789_123456789_123456789_123456789_

Module: Concurrent::Actor::Utils::AsAdHoc

Relationships & Source Files
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: lib/concurrent-ruby-edge/concurrent/actor/utils/ad_hoc.rb

Instance Method Summary

Instance Method Details

#initialize(*args, &initializer)

[ GitHub ]

  
# File 'lib/concurrent-ruby-edge/concurrent/actor/utils/ad_hoc.rb', line 8

def initialize(*args, &initializer)
  @on_message = Type! initializer.call(*args), Proc
end

#on_message(message)

[ GitHub ]

  
# File 'lib/concurrent-ruby-edge/concurrent/actor/utils/ad_hoc.rb', line 12

def on_message(message)
  instance_exec message, &@on_message
end