Class: Beetle::Base
Overview
Abstract base class shared by Publisher and Subscriber
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
:nodoc:.
-
#server ⇒ Object
:nodoc:.
-
#servers ⇒ Object
:nodoc:.
Instance Method Summary collapse
-
#initialize(client, options = {}) ⇒ Base
constructor
:nodoc:.
Methods included from Logging
Constructor Details
#initialize(client, options = {}) ⇒ Base
:nodoc:
10 11 12 13 14 15 16 17 |
# File 'lib/beetle/base.rb', line 10 def initialize(client, = {}) #:nodoc: @options = @client = client @servers = @client.servers.clone @server = @servers[rand @servers.size] @exchanges = {} @queues = {} end |
Instance Attribute Details
#options ⇒ Object
:nodoc:
8 9 10 |
# File 'lib/beetle/base.rb', line 8 def @options end |
#server ⇒ Object
:nodoc:
8 9 10 |
# File 'lib/beetle/base.rb', line 8 def server @server end |
#servers ⇒ Object
:nodoc:
8 9 10 |
# File 'lib/beetle/base.rb', line 8 def servers @servers end |