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.
76 77 78 79 80 |
# File 'lib/discharger/setup_runner/configuration.rb', line 76 def initialize @port = 6379 @name = "redis-app" @version = "latest" end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
74 75 76 |
# File 'lib/discharger/setup_runner/configuration.rb', line 74 def name @name end |
#port ⇒ Object
Returns the value of attribute port.
74 75 76 |
# File 'lib/discharger/setup_runner/configuration.rb', line 74 def port @port end |
#version ⇒ Object
Returns the value of attribute version.
74 75 76 |
# File 'lib/discharger/setup_runner/configuration.rb', line 74 def version @version end |
Instance Method Details
#from_hash(hash) ⇒ Object
82 83 84 85 86 |
# File 'lib/discharger/setup_runner/configuration.rb', line 82 def from_hash(hash) @port = hash["port"] if hash["port"] @name = hash["name"] if hash["name"] @version = hash["version"] if hash["version"] end |