Sha256: 957e5d5a517859b39b41358f296d12f277ae56b5fa6b530dd78ba41e5df08b34

Contents?: true

Size: 590 Bytes

Versions: 15

Compression:

Stored size: 590 Bytes

Contents

module Slacky
  class CLI
    attr_reader :bot

    def initialize(name, bot_class, opts)
      throw "CLI must be passed a name" unless name
      @options = { :verbose => false }.merge opts
      config = Config.new name
      daemon = Daemon.new config, bot_class
      @service = Service.new config, daemon
    end

    def run(params)
      @service.run
    end

    def start(params)
      @service.start
    end

    def stop(params)
      @service.stop
    end

    def restart(params)
      @service.restart
    end

    def status(params)
      @service.status
    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
slacky-0.3.0 lib/slacky/cli.rb
slacky-0.2.9 lib/slacky/cli.rb
slacky-0.2.8 lib/slacky/cli.rb
slacky-0.2.7 lib/slacky/cli.rb
slacky-0.2.6 lib/slacky/cli.rb
slacky-0.2.5 lib/slacky/cli.rb
slacky-0.2.4 lib/slacky/cli.rb
slacky-0.2.3 lib/slacky/cli.rb
slacky-0.2.2 lib/slacky/cli.rb
slacky-0.2.1 lib/slacky/cli.rb
slacky-0.2 lib/slacky/cli.rb
slacky-0.1.4 lib/slacky/cli.rb
slacky-0.1.3 lib/slacky/cli.rb
slacky-0.1.2 lib/slacky/cli.rb
slacky-0.1.1 lib/slacky/cli.rb