lib/cm_sms/messenger.rb in cm-sms-0.1.1 vs lib/cm_sms/messenger.rb in cm-sms-0.1.2
- old
+ new
@@ -1,25 +1,26 @@
module CmSms
class Messenger
- attr_accessor :from, :to, :body, :dcs
+ attr_accessor :from, :to, :body, :dcs, :reference
def initialize(attributes = {})
self.class.default_params ||= {}
@from = attributes[:from] || self.class.default_params[:from]
@to = attributes[:to] || self.class.default_params[:to]
@dcs = attributes[:dcs] || self.class.default_params[:dcs]
@body = attributes[:body]
+ @reference = attributes[:reference]
end
def content(attributes = {})
attributes.each { |attr, value| send("#{attr}=", value) }
self
end
def message
- @message ||= CmSms::Message.new(from: from, to: to, dcs: dcs, body: body)
+ @message ||= CmSms::Message.new(from: from, to: to, dcs: dcs, body: body, reference: reference)
end
def self.method_missing(method_name, *args) # :nodoc:
if new.respond_to?(method_name.to_s)
CmSms::MessageDelivery.new(self, method_name, *args)
\ No newline at end of file