Class: DeployMongo::Config
- Inherits:
-
Object
- Object
- DeployMongo::Config
- Defined in:
- lib/deploy_mongo/config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #database ⇒ Object
- #delta_path ⇒ Object
- #hostname ⇒ Object
-
#initialize(config) ⇒ Config
constructor
A new instance of Config.
- #merge_config(config) ⇒ Object
- #mongo_shell_path ⇒ Object
- #port ⇒ Object
Constructor Details
#initialize(config) ⇒ Config
Returns a new instance of Config.
5 6 7 |
# File 'lib/deploy_mongo/config.rb', line 5 def initialize(config) @config = config end |
Class Method Details
Instance Method Details
#database ⇒ Object
27 28 29 |
# File 'lib/deploy_mongo/config.rb', line 27 def database @config["database"] end |
#delta_path ⇒ Object
23 24 25 |
# File 'lib/deploy_mongo/config.rb', line 23 def delta_path @config["config_folder_path"] + "/" + @config["delta_path"] end |
#hostname ⇒ Object
15 16 17 |
# File 'lib/deploy_mongo/config.rb', line 15 def hostname @config["hostname"] end |
#merge_config(config) ⇒ Object
35 36 37 |
# File 'lib/deploy_mongo/config.rb', line 35 def merge_config(config) @config = @config.merge(config) end |
#mongo_shell_path ⇒ Object
31 32 33 |
# File 'lib/deploy_mongo/config.rb', line 31 def mongo_shell_path @config["mongo_shell_path"] end |
#port ⇒ Object
19 20 21 |
# File 'lib/deploy_mongo/config.rb', line 19 def port @config["port"] end |