Class: Hipbot::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/hipbot/configuration.rb

Constant Summary collapse

OPTIONS =
[
  :adapter, :exception_handler, :helpers, :jid, :join, :logger, :password,
  :plugins, :preloader, :rooms, :status, :storage, :teams, :user
]

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/hipbot/configuration.rb', line 9

def initialize
  self.adapter       = Adapters::Hipchat
  self.exception_handler = Proc.new{ |e| Hipbot.logger.error(e) }
  self.helpers       = Module.new
  self.jid           = ''
  self.join          = :all
  self.logger        = Logger.new($stdout)
  self.password      = ''
  self.plugins       = Hipbot.plugins
  self.preloader     = Proc.new{}
  self.rooms         = {}
  self.status        = ''
  self.storage       = Storages::Hash
  self.teams         = {}
end

Instance Method Details

#userObject



25
26
27
# File 'lib/hipbot/configuration.rb', line 25

def user
  @user ||= User.new(name: 'robot')
end