Class: PostmarkMailer::MessageDelivery
- Inherits:
-
Object
- Object
- PostmarkMailer::MessageDelivery
- Defined in:
- lib/postmark_mailer/message_delivery.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #deliver_later ⇒ Object
- #deliver_now ⇒ Object
-
#initialize(opts) ⇒ MessageDelivery
constructor
A new instance of MessageDelivery.
Constructor Details
#initialize(opts) ⇒ MessageDelivery
Returns a new instance of MessageDelivery.
7 8 9 10 |
# File 'lib/postmark_mailer/message_delivery.rb', line 7 def initialize(opts) @client = Postmark::ApiClient.new(PostmarkMailer.configuration.api_key) @options = opts end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
5 6 7 |
# File 'lib/postmark_mailer/message_delivery.rb', line 5 def client @client end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/postmark_mailer/message_delivery.rb', line 5 def @options end |
Instance Method Details
#deliver_later ⇒ Object
16 17 18 |
# File 'lib/postmark_mailer/message_delivery.rb', line 16 def deliver_later DeliveryJob.perform_later() end |
#deliver_now ⇒ Object
12 13 14 |
# File 'lib/postmark_mailer/message_delivery.rb', line 12 def deliver_now client.deliver_with_template() end |