Class: BotMob::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/bot_mob/connection.rb

Overview

## BotMob::Connection

The Connection is the point of contact between the Bot and the specified network

Direct Known Subclasses

Development::Connection, Slack::Connection

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#botObject (readonly)

Returns the value of attribute bot.



7
8
9
# File 'lib/bot_mob/connection.rb', line 7

def bot
  @bot
end

Class Method Details

.setup(network, bot, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/bot_mob/connection.rb', line 9

def self.setup(network, bot, options = {})
  invalid_network_error(network) unless BotMob.valid_network?(network)

  connection = network_delegate(network)
  invalid_delegate_error(network) unless connection.respond_to?(:setup)

  connection.setup(bot, options)
end

Instance Method Details

#deliver(outbound_message, options = {}) ⇒ Object



18
19
20
# File 'lib/bot_mob/connection.rb', line 18

def deliver(outbound_message, options = {})
  # connection.deliver(outbound_message, options)
end