Class: SmsNotifier

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

Instance Method Summary collapse

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(message)
  @email_notifier.notify(message, :to => "#{@phone}@teleflip.com", :subject => nil)
end