Method: Codebot::Core#initialize

Defined in:
lib/codebot/core.rb

#initialize(params = {}) ⇒ Core

Creates a new bot from the supplied hash.

Parameters:

  • params (Hash) (defaults to: {})

    A hash with symbolic keys for initializing this instance. The only accepted keys are :config_file and :ipc_pipe. Any other keys are ignored.



28
29
30
31
32
33
# File 'lib/codebot/core.rb', line 28

def initialize(params = {})
  @config     = Config.new(self, params[:config_file])
  @irc_client = IRCClient.new(self)
  @web_server = WebServer.new(self)
  @ipc_server = IPCServer.new(self, params[:ipc_pipe])
end