Class: Discharger::SetupRunner::RedisConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRedisConfig

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

#nameObject

Returns the value of attribute name.



60
61
62
# File 'lib/discharger/setup_runner/configuration.rb', line 60

def name
  @name
end

#portObject

Returns the value of attribute port.



60
61
62
# File 'lib/discharger/setup_runner/configuration.rb', line 60

def port
  @port
end

#versionObject

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