Class: Similus::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/similus/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

:nodoc:



13
14
15
16
17
18
# File 'lib/similus/config.rb', line 13

def initialize #:nodoc:
  self.backend      = :redis
  self.redis_server = "localhost:6379"
  self.redis_db     = 9
  self.logfile      = STDOUT
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



8
9
10
# File 'lib/similus/config.rb', line 8

def backend
  @backend
end

#logfileObject

Returns the value of attribute logfile.



11
12
13
# File 'lib/similus/config.rb', line 11

def logfile
  @logfile
end

#redis_dbObject

Returns the value of attribute redis_db.



10
11
12
# File 'lib/similus/config.rb', line 10

def redis_db
  @redis_db
end

#redis_serverObject

Returns the value of attribute redis_server.



9
10
11
# File 'lib/similus/config.rb', line 9

def redis_server
  @redis_server
end

Instance Method Details

#loggerObject



20
21
22
# File 'lib/similus/config.rb', line 20

def logger
  @logger ||= Logger.new(logfile)
end