Class: Slacky::CLI

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, bot_class, opts) ⇒ CLI

Returns a new instance of CLI.



5
6
7
8
9
# File 'lib/slacky/cli.rb', line 5

def initialize(name, bot_class, opts)
  raise "CLI must be passed a name" unless name
  config = Config.new name
  @service = Service.new config, bot_class
end

Instance Attribute Details

#botObject (readonly)

Returns the value of attribute bot.



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

def bot
  @bot
end

Instance Method Details

#run(params) ⇒ Object



11
12
13
# File 'lib/slacky/cli.rb', line 11

def run(params)
  @service.run
end