Dmitrii Golub
11 years ago
6 changed files with 49 additions and 2 deletions
@ -0,0 +1,17 @@
|
||||
require 'ostruct' |
||||
|
||||
class SMSProvider |
||||
Message = Class.new(OpenStruct) |
||||
|
||||
class_attribute :messages |
||||
self.messages = [] |
||||
|
||||
def self.send_message(opts = {}) |
||||
self.messages << Message.new(opts) |
||||
end |
||||
|
||||
def self.last_message |
||||
self.messages.last |
||||
end |
||||
|
||||
end |
Loading…
Reference in new issue