Module: Push::Backend

Defined in:
lib/push/backend.rb

Overview

Backends for test and development environments

Defined Under Namespace

Classes: AMQP, Test

Class Method Summary collapse

Class Method Details

.adapter(name = Push.config.backend) ⇒ Object



55
56
57
# File 'lib/push/backend.rb', line 55

def self.adapter(name=Push.config.backend)
  adapters[name.to_sym].new
end

.adaptersObject



59
60
61
# File 'lib/push/backend.rb', line 59

def self.adapters
  @adapters ||= {}
end

.register_adapter(name, adapter) ⇒ Object



51
52
53
# File 'lib/push/backend.rb', line 51

def self.register_adapter(name, adapter)
  adapters[name.to_sym] = adapter
end