Class: Slacky::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/slacky/service.rb

Instance Method Summary collapse

Constructor Details

#initialize(config, bot_class) ⇒ Service

Returns a new instance of Service.



3
4
5
6
# File 'lib/slacky/service.rb', line 3

def initialize(config, bot_class)
  @config = config
  @bot_class = bot_class
end

Instance Method Details

#runObject



8
9
10
11
12
13
# File 'lib/slacky/service.rb', line 8

def run
  puts "#{@config.name} is running"
  bot = Bot.new @config
  @bot_class.new bot
  bot.run
end