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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bot, **options) ⇒ Connection

Returns a new instance of Connection.



9
10
11
12
# File 'lib/bot_mob/connection.rb', line 9

def initialize(bot, **options)
  @bot = bot
  @options = options
end

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

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Class Method Details

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



14
15
16
# File 'lib/bot_mob/connection.rb', line 14

def self.setup(network, bot, options = {})
  connection_delegate(network).new(bot, options)
end

Instance Method Details

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



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

def deliver(outbound_message, _options = {})
  # deliver(outbound_message, options)
  # noop
  outbound_message
end