Class: JabberDelivery::DeliveryMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/jabber_delivery/delivery_method.rb

Instance Method Summary collapse

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 = {})
  @options = 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