class LetterOpenerWeb::DeliveryMethod

Public Instance Methods

deliver!(mail) click to toggle source
Calls superclass method
# File lib/letter_opener_web/delivery_method.rb, line 7
def deliver!(mail)
  original = ENV.fetch('LAUNCHY_DRY_RUN', nil)
  ENV['LAUNCHY_DRY_RUN'] = 'true'

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