Class: LetterThief::DeliveryMethod
- Inherits:
-
Object
- Object
- LetterThief::DeliveryMethod
- Defined in:
- lib/letter_thief/delivery_method.rb
Instance Method Summary collapse
-
#deliver!(mail) ⇒ Object
this is not really true, we don’t know if it’s the last email, but for the moment this should do.
-
#initialize(options = {}) ⇒ DeliveryMethod
constructor
A new instance of DeliveryMethod.
Constructor Details
#initialize(options = {}) ⇒ DeliveryMethod
Returns a new instance of DeliveryMethod.
5 6 |
# File 'lib/letter_thief/delivery_method.rb', line 5 def initialize( = {}) end |
Instance Method Details
#deliver!(mail) ⇒ Object
this is not really true, we don’t know if it’s the last email, but for the moment this should do.
9 10 11 12 13 14 |
# File 'lib/letter_thief/delivery_method.rb', line 9 def deliver!(mail) require "launchy" ::Launchy.open(LetterThief::Engine.routes.url_helpers.(LetterThief::EmailMessage.last, Rails.configuration.action_mailer.)) rescue LoadError puts "WARNING: LetterThief requires the 'launchy' gem to open the email in a web browser. Add it to your Gemfile." end |