Class: JabberDelivery::DeliveryMethod
- Inherits:
-
Object
- Object
- JabberDelivery::DeliveryMethod
- Defined in:
- lib/jabber_delivery/delivery_method.rb
Instance Method Summary collapse
- #deliver!(mail) ⇒ Object
-
#initialize(options = {}) ⇒ DeliveryMethod
constructor
A new instance of DeliveryMethod.
Constructor Details
#initialize(options = {}) ⇒ DeliveryMethod
Returns a new instance of DeliveryMethod.
6 7 8 9 10 11 |
# File 'lib/jabber_delivery/delivery_method.rb', line 6 def initialize( = {}) @options = raise "JID should be specified for jabber delivery" unless jid raise "password should be specified for jabber delivery" unless password end |
Instance Method Details
#deliver!(mail) ⇒ Object
13 14 15 |
# File 'lib/jabber_delivery/delivery_method.rb', line 13 def deliver!(mail) jabber_client.deliver(mail.to.first, mail.body.to_s) end |