lib/amqp/client.rb in celldee-bunny-0.0.1 vs lib/amqp/client.rb in celldee-bunny-0.0.2

- old
+ new

@@ -2,11 +2,11 @@ class Client CONNECT_TIMEOUT = 1.0 RETRY_DELAY = 10.0 attr_reader :status - attr_accessor :channel, :host, :logging, :port, :ticket + attr_accessor :channel, :host, :logging, :exchanges, :queues, :port, :ticket class ServerDown < StandardError; end class ProtocolError < StandardError; end def initialize(opts = {}) @@ -17,9 +17,17 @@ @vhost = opts[:vhost] || '/' @logging = opts[:logging] || false @insist = opts[:insist] @status = 'NOT CONNECTED' end + + def exchanges + @exchanges ||= {} + end + + def queues + @queues ||= {} + end def send_frame(*args) args.each do |data| data.ticket = ticket if ticket and data.respond_to?(:ticket=) data = data.to_frame(channel) unless data.is_a?(Frame) \ No newline at end of file