Module: MailRoom::Delivery

Defined in:
lib/mail_room/delivery.rb,
lib/mail_room/delivery/que.rb,
lib/mail_room/delivery/noop.rb,
lib/mail_room/delivery/logger.rb,
lib/mail_room/delivery/sidekiq.rb,
lib/mail_room/delivery/postback.rb,
lib/mail_room/delivery/letter_opener.rb

Defined Under Namespace

Classes: LetterOpener, Logger, Noop, Postback, Que, Sidekiq

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Object


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/mail_room/delivery.rb', line 3

def [](name)
  require_relative("./delivery/#{name}")

  case name
  when "postback"
    Delivery::Postback
  when "logger"
    Delivery::Logger
  when "letter_opener"
    Delivery::LetterOpener
  when "sidekiq"
    Delivery::Sidekiq
  when "que"
    Delivery::Que
  else
    Delivery::Noop
  end
end