Module: PostmarkDeliveryMethod
- Defined in:
- lib/postmark_delivery_method.rb
Overview
This module is only used for Rails 2.
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #create_mail_with_postmark_extras ⇒ Object
- #perform_delivery_postmark(message) ⇒ Object
- #postmark_attachments(value) ⇒ Object
- #tag(value) ⇒ Object
Class Method Details
.included(base) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/postmark_delivery_method.rb', line 14 def self.included(base) base.extend(ClassMethods) base.class_eval do alias_method_chain :create_mail, :postmark_extras end end |
Instance Method Details
#create_mail_with_postmark_extras ⇒ Object
34 35 36 37 38 39 |
# File 'lib/postmark_delivery_method.rb', line 34 def create_mail_with_postmark_extras create_mail_without_postmark_extras.tap do |mail| mail.tag = @tag if @tag mail. = @attachments if @attachments end end |
#perform_delivery_postmark(message) ⇒ Object
22 23 24 |
# File 'lib/postmark_delivery_method.rb', line 22 def perform_delivery_postmark() Postmark.send_through_postmark() end |
#postmark_attachments(value) ⇒ Object
30 31 32 |
# File 'lib/postmark_delivery_method.rb', line 30 def (value) @attachments = value end |
#tag(value) ⇒ Object
26 27 28 |
# File 'lib/postmark_delivery_method.rb', line 26 def tag(value) @tag = value end |