Class: Discharger::SetupRunner::RedisConfig
- Inherits:
-
Object
- Object
- Discharger::SetupRunner::RedisConfig
- Defined in:
- lib/discharger/setup_runner/configuration.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#port ⇒ Object
Returns the value of attribute port.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #from_hash(hash) ⇒ Object
-
#initialize ⇒ RedisConfig
constructor
A new instance of RedisConfig.
Constructor Details
#initialize ⇒ RedisConfig
Returns a new instance of RedisConfig.
62 63 64 65 66 |
# File 'lib/discharger/setup_runner/configuration.rb', line 62 def initialize @port = 6379 @name = "redis-app" @version = "latest" end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
60 61 62 |
# File 'lib/discharger/setup_runner/configuration.rb', line 60 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
60 61 62 |
# File 'lib/discharger/setup_runner/configuration.rb', line 60 def port @port end |
#version ⇒ Object
Returns the value of attribute version.
60 61 62 |
# File 'lib/discharger/setup_runner/configuration.rb', line 60 def version @version end |
Instance Method Details
#from_hash(hash) ⇒ Object
68 69 70 71 72 |
# File 'lib/discharger/setup_runner/configuration.rb', line 68 def from_hash(hash) @port = hash["port"] if hash["port"] @name = hash["name"] if hash["name"] @version = hash["version"] if hash["version"] end |