Class: SlackbotFrd::Bot

Inherits:
Object
  • Object
show all
Defined in:
lib/slackbot_frd/lib/bot.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.botsObject

Returns the value of attribute bots.



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

def bots
  @bots
end

Class Method Details

.only(*bots) ⇒ Object



4
5
6
7
# File 'lib/slackbot_frd/lib/bot.rb', line 4

def self.only(*bots)
  @bots ||= []
  @bots.push(bots).flatten!
end

Instance Method Details

#add_callbacks(slack_connection) ⇒ Object

This is where the bot adds all of their callbacks to the bpbot

Raises:

  • (StandardError)


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

def add_callbacks(slack_connection)
  raise StandardError.new('You must override the define() method for your bot to do anything')
end