Class: Bot::Adapter::Test

Inherits:
Base
  • Object
show all
Defined in:
lib/bot/adapters/test.rb

Constant Summary collapse

@@sent_messages =
[]

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#config, #initialize

Constructor Details

This class inherits a constructor from Bot::Adapter::Base

Class Method Details

.empty_messagesObject



18
19
20
# File 'lib/bot/adapters/test.rb', line 18

def self.empty_messages
  @@sent_messages = []
end

.sent_messagesObject



14
15
16
# File 'lib/bot/adapters/test.rb', line 14

def self.sent_messages
  @@sent_messages
end

Instance Method Details

#get_profile_image(username, as_user) ⇒ Object



10
11
12
# File 'lib/bot/adapters/test.rb', line 10

def get_profile_image(username, as_user)
  "#{username}_profile_image"
end

#send_messages(messages, from) ⇒ Object



6
7
8
# File 'lib/bot/adapters/test.rb', line 6

def send_messages(messages, from)
  @@sent_messages += Array.wrap(messages)
end

#verify_request(request) ⇒ Object



22
23
24
# File 'lib/bot/adapters/test.rb', line 22

def verify_request(request)
  true
end