class SmsSafe::Message
Different texter gems will have different classes for their messages. This is a common class that acts as an impedance adapter. Most of our methods use this class
@!attribute from
@return [String] name or phone number of the author of the message.
@!attribute to
@return [String] phone number of the recipient of the message.
@!attribute text
@return [String] actual message to send.
@!attribute original_message
@return [String] original message sent by the texter gem, unmapped.
Attributes
from[RW]
original_message[RW]
text[RW]
to[RW]
Public Class Methods
new(attrs)
click to toggle source
Set all params as internal values. @param [Hash] attrs accepts :from, :to, :text and :original_message
# File lib/sms_safe/message.rb, line 19 def initialize(attrs) attrs.each { |k, v| self.send "#{k.to_s}=".to_sym, v } end