Class: LetterOpenerWeb::DeliveryMethod

Inherits:
LetterOpener::DeliveryMethod
  • Object
show all
Defined in:
lib/letter_opener_web/delivery_method.rb

Instance Method Summary collapse

Instance Method Details

#deliver!(mail) ⇒ Object



7
8
9
10
11
12
13
14
15
16
# File 'lib/letter_opener_web/delivery_method.rb', line 7

def deliver!(mail)
  original = ENV['LAUNCHY_DRY_RUN']
  ENV['LAUNCHY_DRY_RUN'] = 'true'

  super
rescue Launchy::CommandNotFoundError # rubocop:disable Lint/SuppressedException
  # Ignore for non-executable Launchy environment.
ensure
  ENV['LAUNCHY_DRY_RUN'] = original
end