Class: AiNoto::Message
- Inherits:
-
Object
- Object
- AiNoto::Message
- Defined in:
- lib/ai_noto.rb
Instance Attribute Summary collapse
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#twilio_client ⇒ Object
Returns the value of attribute twilio_client.
Instance Method Summary collapse
-
#initialize(contents, twilio_client) ⇒ Message
constructor
A new instance of Message.
- #send_sms! ⇒ Object
Constructor Details
#initialize(contents, twilio_client) ⇒ Message
Returns a new instance of Message.
40 41 42 43 |
# File 'lib/ai_noto.rb', line 40 def initialize(contents, twilio_client) @contents = contents @twilio_client = twilio_client end |
Instance Attribute Details
#contents ⇒ Object
Returns the value of attribute contents.
38 39 40 |
# File 'lib/ai_noto.rb', line 38 def contents @contents end |
#twilio_client ⇒ Object
Returns the value of attribute twilio_client.
38 39 40 |
# File 'lib/ai_noto.rb', line 38 def twilio_client @twilio_client end |
Instance Method Details
#send_sms! ⇒ Object
45 46 47 48 49 |
# File 'lib/ai_noto.rb', line 45 def send_sms! twilio_client.api.account..create(from: AiNoto.from_number, to: AiNoto.to_number, body: contents) end |