Class: SimplePubSub::Client
- Inherits:
-
Object
- Object
- SimplePubSub::Client
- Defined in:
- lib/simplepubsub.rb
Defined Under Namespace
Classes: PubSub
Instance Attribute Summary collapse
-
#remote_obj ⇒ Object
readonly
Returns the value of attribute remote_obj.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hostname) ⇒ Client
constructor
generally used by the web server.
Constructor Details
#initialize(hostname) ⇒ Client
generally used by the web server
54 55 56 57 58 59 |
# File 'lib/simplepubsub.rb', line 54 def initialize(hostname) DRb.start_service # attach to the DRb server via a URI given on the command line @remote_obj = DRbObject.new nil, "druby://#{hostname}:59000" end |
Instance Attribute Details
#remote_obj ⇒ Object (readonly)
Returns the value of attribute remote_obj.
50 51 52 |
# File 'lib/simplepubsub.rb', line 50 def remote_obj @remote_obj end |
Class Method Details
.connect(base_url) {|PubSub.new base_url| ... } ⇒ Object
61 62 63 |
# File 'lib/simplepubsub.rb', line 61 def self.connect(base_url) yield(PubSub.new base_url) end |