Sha256: 2347436710c3036f597eb8861f29f788ba4bf3f94f9c0c193762f30c4ceaf969
Contents?: true
Size: 618 Bytes
Versions: 1
Compression:
Stored size: 618 Bytes
Contents
require 'miu/socket' require 'miu/subscribable' require 'miu/utility' module Miu module Subscriber class << self def new(*args, &block) options = Miu::Utility.extract_options! args host = args.shift || '127.0.0.1' port = args.shift || Miu.default_pub_port socket = options[:socket] || SubSocket klass = Class.new(socket, &block) klass.send :include, Subscribable klass.send :include, self klass.new.tap do |sub| address = Miu::Socket.build_address host, port sub.connect address end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
miu-0.2.0 | lib/miu/subscriber.rb |