Class: Hermes::PublisherFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/hermes/publisher_factory.rb

Class Method Summary collapse

Class Method Details

.build(adapter) ⇒ Object



6
7
8
9
10
11
12
13
14
15
# File 'lib/hermes/publisher_factory.rb', line 6

def self.build(adapter)
  case adapter
    when :hutch
      Hermes::Publisher::HutchAdapter.new
    when :in_memory
      Hermes::Publisher::InMemoryAdapter.new
    else
      raise "invalid async messaging adapter: #{adapter}"
  end
end