Class: Superbolt::Connection::Base
- Inherits:
-
Object
- Object
- Superbolt::Connection::Base
- Defined in:
- lib/superbolt/connection/base.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
- #channel ⇒ Object
- #close ⇒ Object
- #connection ⇒ Object
-
#initialize(name, config = nil) ⇒ Base
constructor
A new instance of Base.
- #q ⇒ Object
Constructor Details
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/superbolt/connection/base.rb', line 4 def config @config end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/superbolt/connection/base.rb', line 4 def name @name end |
Class Method Details
.default_options ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/superbolt/connection/base.rb', line 30 def self. { :auto_delete => false, :durable => true, :exclusive => false } end |
Instance Method Details
#channel ⇒ Object
26 27 28 |
# File 'lib/superbolt/connection/base.rb', line 26 def channel connection.channel end |
#close ⇒ Object
15 16 17 |
# File 'lib/superbolt/connection/base.rb', line 15 def close raise NotImplementedError end |
#connection ⇒ Object
11 12 13 |
# File 'lib/superbolt/connection/base.rb', line 11 def connection raise NotImplementedError end |
#q ⇒ Object
19 20 21 |
# File 'lib/superbolt/connection/base.rb', line 19 def q @q ||= connection.queue(name, self.class.) end |