Class: HiCathy::SMS

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

Constant Summary collapse

ACCOUNT_SID =
'ACb5c843869d38af5284dbc62654912108'
AUTH_TOKEN =

oh god please don’t steal this

'c78fee62bb4fd1eb23d4cae446a3b7b9'
FROM =
'+14173522849'
TO =
'+16176316733'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSMS

Returns a new instance of SMS.



15
16
17
# File 'lib/hi_cathy/sms.rb', line 15

def initialize
  @client = Twilio::REST::Client.new ACCOUNT_SID, AUTH_TOKEN
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



13
14
15
# File 'lib/hi_cathy/sms.rb', line 13

def client
  @client
end

Instance Method Details

#send!(message) ⇒ Object



19
20
21
# File 'lib/hi_cathy/sms.rb', line 19

def send!(message)
  client.messages.create(body: message, from: FROM, to: TO)
end