Class: SmsNotifier
- Inherits:
-
Object
- Object
- SmsNotifier
- Defined in:
- lib/sms_notifier.rb
Instance Method Summary collapse
-
#initialize(email_notifier, phone) ⇒ SmsNotifier
constructor
A new instance of SmsNotifier.
- #notify(message) ⇒ Object
Constructor Details
#initialize(email_notifier, phone) ⇒ SmsNotifier
Returns a new instance of SmsNotifier.
2 3 4 |
# File 'lib/sms_notifier.rb', line 2 def initialize(email_notifier, phone) @email_notifier, @phone = email_notifier, phone.gsub(/\D/, '') end |
Instance Method Details
#notify(message) ⇒ Object
6 7 8 |
# File 'lib/sms_notifier.rb', line 6 def notify() @email_notifier.notify(, :to => "#{@phone}@teleflip.com", :subject => nil) end |