Class: HSDeploy::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/hsdeploy/config.rb

Class Method Summary collapse

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

.allObject



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

.saveObject



18
19
20
# File 'lib/hsdeploy/config.rb', line 18

def self.save
  @@configfile.save unless @@configfile.to_h.empty?
end