Module: ConfigReader

Included in:
CommonRestUtils, Route, Zone
Defined in:
lib/config_reader.rb

Instance Method Summary collapse

Instance Method Details

#config_dir ⇒ Object



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

def config_dir
  ConfigHandler::CONFIG_DIRECTORY
end

#config_file(*dirs_file) ⇒ Object



19
20
21
# File 'lib/config_reader.rb', line 19

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

#mkdir(*dirs) ⇒ Object



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

def mkdir(*dirs)
  path = config_file(*dirs)
  if ! Dir.exists?(path)
    Dir.mkdir path
  end
  path
end

#param(name) ⇒ Object



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

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