Created
February 18, 2015 21:56
-
-
Save bradstewart/f3710f6cb4b9e1f4f57e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# initializers/twilio.rb | |
require 'twilio-ruby' | |
Twilio.configure do |config| | |
config.account_sid = account_sid | |
config.auth_token = auth_token | |
end |
This file contains hidden or 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
# app/services/twilio | |
module Twilio | |
extend self | |
def send_text(*args) | |
client.messages.create(args) | |
end | |
def client | |
@client ||= Twilio::REST::Client.new | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment