Class: Commendo::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



6
7
8
9
10
11
# File 'lib/commendo/configuration.rb', line 6

def initialize
  @backend = :redis
  @host = 'localhost'
  @port = 6379
  @database = 15
end

Instance Attribute Details

#backendObject

Returns the value of attribute backend.



4
5
6
# File 'lib/commendo/configuration.rb', line 4

def backend
  @backend
end

#databaseObject

Returns the value of attribute database.



4
5
6
# File 'lib/commendo/configuration.rb', line 4

def database
  @database
end

#hostObject

Returns the value of attribute host.



4
5
6
# File 'lib/commendo/configuration.rb', line 4

def host
  @host
end

#passwordObject

Returns the value of attribute password.



4
5
6
# File 'lib/commendo/configuration.rb', line 4

def password
  @password
end

#portObject

Returns the value of attribute port.



4
5
6
# File 'lib/commendo/configuration.rb', line 4

def port
  @port
end

#usernameObject

Returns the value of attribute username.



4
5
6
# File 'lib/commendo/configuration.rb', line 4

def username
  @username
end

Instance Method Details

#to_hashObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/commendo/configuration.rb', line 13

def to_hash
  {
      backend: backend,
      host: host,
      port: port,
      database: database,
      username: username,
      password: password
  }
end