Module: Tra
- Extended by:
- Forwardable
- Defined in:
- lib/tra.rb,
lib/tra/fork.rb,
lib/tra/mailbox.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.enumerator ⇒ Object
12 13 14 15 16 |
# File 'lib/tra.rb', line 12 def enumerator @enumerator ||= Enumerator.new do |y| loop { y << QUEUE.pop } end end |
.on(pattern, &action) ⇒ Object
21 22 23 |
# File 'lib/tra.rb', line 21 def on pattern, &action PATTERNS[pattern] = action end |