Created
April 19, 2017 01:04
-
-
Save jeanpaulsio/b37e01f6018e668c77566be8a4c30cd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SendDemoWuphf | |
def initialize(demo_wuphf) | |
@demo_wuphf = demo_wuphf | |
end | |
def execute | |
send_email | |
send_text | |
send_tweet | |
end | |
def send_email | |
WuphfMailer.wuphf_mail(@demo_wuphf).deliver_now | |
end | |
def send_text | |
twilio = TwilioWrapper.new | |
twilio.message = @demo_wuphf.message | |
twilio.phone = @demo_wuphf.phone | |
twilio.from = @demo_wuphf.from | |
twilio.send_sms | |
end | |
def send_tweet | |
twitter = TwitterWrapper.new | |
twitter.message = @demo_wuphf.message | |
twitter.twitter_handle = @demo_wuphf.twitter_handle | |
twitter.tweet | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment