Class: Commendo::Configuration
- Inherits:
-
Object
- Object
- Commendo::Configuration
- Defined in:
- lib/commendo/configuration.rb
Instance Attribute Summary collapse
-
#backend ⇒ Object
Returns the value of attribute backend.
-
#database ⇒ Object
Returns the value of attribute database.
-
#host ⇒ Object
Returns the value of attribute host.
-
#password ⇒ Object
Returns the value of attribute password.
-
#port ⇒ Object
Returns the value of attribute port.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ Configuration
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
#backend ⇒ Object
Returns the value of attribute backend.
4 5 6 |
# File 'lib/commendo/configuration.rb', line 4 def backend @backend end |
#database ⇒ Object
Returns the value of attribute database.
4 5 6 |
# File 'lib/commendo/configuration.rb', line 4 def database @database end |
#host ⇒ Object
Returns the value of attribute host.
4 5 6 |
# File 'lib/commendo/configuration.rb', line 4 def host @host end |
#password ⇒ Object
Returns the value of attribute password.
4 5 6 |
# File 'lib/commendo/configuration.rb', line 4 def password @password end |
#port ⇒ Object
Returns the value of attribute port.
4 5 6 |
# File 'lib/commendo/configuration.rb', line 4 def port @port end |
#username ⇒ Object
Returns the value of attribute username.
4 5 6 |
# File 'lib/commendo/configuration.rb', line 4 def username @username end |
Instance Method Details
#to_hash ⇒ Object
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 |