Class: CnSms::Adapter::Mock
Constant Summary collapse
- @@sent_sms =
nil
Instance Method Summary collapse
-
#initialize(config) ⇒ Mock
constructor
A new instance of Mock.
- #send(phone, msg) ⇒ Object
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 |