diff options
| -rw-r--r-- | README.rdoc | 8 | ||||
| -rw-r--r-- | lib/sms_fu/sms_fu.rb | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/README.rdoc b/README.rdoc index a852722..af046de 100644 --- a/README.rdoc +++ b/README.rdoc @@ -74,15 +74,13 @@ etc. :pony_options as well, if necessary. # ActionMailer delivery - sms_fu = SMSFu.configure(:delivery => :action_mailer) + sms_fu = SMSFu.configure(:action_mailer) # Pony delivery via Sendmail - sms_fu = SMSFu.configure(:delivery => :pony, :pony_options => { :via => :sendmail }) + sms_fu = SMSFu.configure(:pony, :pony_options => { :via => :sendmail }) # Pony delivery via SMTP - sms_fu = SMSFu.configure(:delivery => :pony, - :pony_options => { - :via => :smtp, + sms_fu = SMSFu.configure(:pony, :pony_options => { :via => :smtp, :via_options => { :address => 'smtp.gmail.com', :port => '587', diff --git a/lib/sms_fu/sms_fu.rb b/lib/sms_fu/sms_fu.rb index f726ca2..82af796 100644 --- a/lib/sms_fu/sms_fu.rb +++ b/lib/sms_fu/sms_fu.rb @@ -1,8 +1,8 @@ class SMSFu DELIVERY_OPTIONS = [:action_mailer, :pony] - def self.configure(options = {}) - new(options) + def self.configure(delivery, options = {}) + new(options.merge!(:delivery => delivery.to_sym)) end def initialize(options = {}) |
