class BotMob::Connection
The Connection
is the point of contact between the Bot
and the specified network
Attributes
bot[R]
options[R]
Public Class Methods
new(bot, **options)
click to toggle source
# File lib/bot_mob/connection.rb, line 9 def initialize(bot, **options) @bot = bot @options = options end
setup(network, bot, options = {})
click to toggle source
# File lib/bot_mob/connection.rb, line 14 def self.setup(network, bot, options = {}) connection_delegate(network).new(bot, options) end
Private Class Methods
connection_delegate(network)
click to toggle source
# File lib/bot_mob/connection.rb, line 27 def connection_delegate(network) delegate = BotMob::Networks.const_get(network.to_s.camelize) delegate.const_get('Connection') rescue NameError raise BotMob::InvalidNetworkError end
Public Instance Methods
deliver(outbound_message, _options = {})
click to toggle source
# File lib/bot_mob/connection.rb, line 18 def deliver(outbound_message, _options = {}) # deliver(outbound_message, options) # noop outbound_message end