Class: TWW::Testing

Inherits:
Client show all
Defined in:
lib/tww/testing.rb

Instance Attribute Summary collapse

Attributes inherited from Client

#config

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Testing

Returns a new instance of Testing.



9
10
11
12
# File 'lib/tww/testing.rb', line 9

def initialize(config)
  super
  @sent = []
end

Instance Attribute Details

#sentObject (readonly)

Returns the value of attribute sent.



7
8
9
# File 'lib/tww/testing.rb', line 7

def sent
  @sent
end

Instance Method Details

#call(phone, message, extras = {}) ⇒ Object



26
27
28
# File 'lib/tww/testing.rb', line 26

def call(phone, message, extras = {})
  request(phone, message, extras)
end

#clear!Object



14
15
16
# File 'lib/tww/testing.rb', line 14

def clear!
  sent.clear
end

#deliver(phone, message, extras = {}) ⇒ Object



22
23
24
# File 'lib/tww/testing.rb', line 22

def deliver(phone, message, extras = {})
  request(phone, message, extras)
end

#sizeObject



18
19
20
# File 'lib/tww/testing.rb', line 18

def size
  sent.size
end