Class: HSDeploy::Config
- Inherits:
-
Object
- Object
- HSDeploy::Config
- Defined in:
- lib/hsdeploy/config.rb
Class Method Summary collapse
- .[](section) ⇒ Object
- .[]=(section, value) ⇒ Object
- .all ⇒ Object
- .load(filename) ⇒ Object
- .save ⇒ Object
Class Method Details
.[](section) ⇒ Object
7 8 9 |
# File 'lib/hsdeploy/config.rb', line 7 def self.[](section) @@configfile[section] end |
.[]=(section, value) ⇒ Object
10 11 12 |
# File 'lib/hsdeploy/config.rb', line 10 def self.[]=(section, value) @@configfile[section] = value end |
.all ⇒ Object
4 5 6 |
# File 'lib/hsdeploy/config.rb', line 4 def self.all @@configfile.to_h end |
.load(filename) ⇒ Object
14 15 16 |
# File 'lib/hsdeploy/config.rb', line 14 def self.load(filename) @@configfile = IniFile.load(filename) end |
.save ⇒ Object
18 19 20 |
# File 'lib/hsdeploy/config.rb', line 18 def self.save @@configfile.save unless @@configfile.to_h.empty? end |