Module: ConfigReader

Included in:
CommonRestUtils, ConfigInit, HttpSend, Reporting, Route, StructurePrint, TablePrint, VzcdnApp, Zone, ZoneDiff, ZoneList
Defined in:
lib/config_reader.rb

Instance Method Summary collapse

Instance Method Details

#config_dirObject



7
8
9
# File 'lib/config_reader.rb', line 7

def config_dir
  ConfigHandler::CONFIG_DIRECTORY
end

#config_file(*dirs_file) ⇒ Object



21
22
23
24
# File 'lib/config_reader.rb', line 21

def config_file(*dirs_file)
  filename = File.join(config_dir, *dirs_file)
  mkdir filename
end

#mkdir(filename) ⇒ Object



11
12
13
14
# File 'lib/config_reader.rb', line 11

def mkdir(filename)
  FileUtils.mkdir_p(File.dirname(filename))
  filename
end

#param(name) ⇒ Object



3
4
5
# File 'lib/config_reader.rb', line 3

def param(name)
  ConfigHandler.config_parameter(name)
end

#user_file(*dirs_file) ⇒ Object



16
17
18
19
# File 'lib/config_reader.rb', line 16

def user_file(*dirs_file)
  result = File.join(*dirs_file)
  mkdir result
end