Skip to content

Instantly share code, notes, and snippets.

@grantr
Last active December 10, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grantr/4506205 to your computer and use it in GitHub Desktop.
Save grantr/4506205 to your computer and use it in GitHub Desktop.
>> require 'celluloid/zmq'
=> true
>> socket = Celluloid::ZMQ::DealerSocket.new
=> #<Celluloid::ZMQ::DealerSocket:0x00000001d7d470>
>> m = Celluloid::ZMQ::SocketMonitor.new(socket, "socket.monitor")
=> #<Celluloid::ZMQ::SocketMonitor:0x00000001bbf9d0 @socket=#<Celluloid::ZMQ::DealerSocket:0x00000001d7d470>, @topic="socket.monitor", @flags=1023, @listener=#<Celluloid::ZMQ::PairSocket:0x00000001bbf980>>
>> m.terminate
NoMethodError: undefined method `terminate' for #<Celluloid::ZMQ::SocketMonitor:0x00000001bbf9d0>
from (irb):4
from /home/grantr/.rbenv/versions/1.9.3-p362/bin/irb:12:in `<main>'
>>
>> require 'celluloid/zmq'
=> true
>> klass = Celluloid::ZMQ::SocketMonitor
=> Celluloid::ZMQ::SocketMonitor
>> klass.included_modules
=> [Celluloid::ZMQ, Kernel]
>> klass.mailbox_class
NoMethodError: undefined method `mailbox_class' for Celluloid::ZMQ::SocketMonitor:Class
from (irb):4
from /home/grantr/.rbenv/versions/1.9.3-p362/bin/irb:12:in `<main>'
>> klass.send(:include, Celluloid)
=> Celluloid::ZMQ::SocketMonitor
>> klass.included_modules
=> [Celluloid::InstanceMethods, Celluloid, Celluloid::ZMQ, Kernel]
>> klass.mailbox_class
=> Celluloid::Mailbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment