Class: CnSms::Adapter::Mock

Inherits:
Base
  • Object
show all
Defined in:
lib/cn_sms/adapter/mock.rb

Constant Summary collapse

@@sent_sms =
nil

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Mock

Returns a new instance of Mock.



7
8
9
# File 'lib/cn_sms/adapter/mock.rb', line 7

def initialize(config)
  @@sent_sms = []
end

Instance Method Details

#send(phone, msg) ⇒ Object



11
12
13
14
15
# File 'lib/cn_sms/adapter/mock.rb', line 11

def send(phone,msg)
  super(phone,msg)
  @@sent_sms += [{:phone=>phone,:msg=>msg}]
  puts "sms sent phone:#{phone}. Message:#{msg}"
end