Module: ConfigReader

Included in:
CommonRestUtils, ConfigInit, Route, StructurePrint, 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



30
31
32
# File 'lib/config_reader.rb', line 30

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

#imkdir(path) ⇒ Object



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

def imkdir(path)
  if ! Dir.exists?(path)
    Dir.mkdir path
  end
  path
end

#mk_config_dir(*dirs) ⇒ Object



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

def mk_config_dir(*dirs)
  imkdir config_file(*dirs)
end

#mk_user_dir(*dirs) ⇒ Object



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

def mk_user_dir(*dirs)
  imkdir user_file(*dirs)
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



26
27
28
# File 'lib/config_reader.rb', line 26

def user_file(*dirs_file)
  File.join(*dirs_file)
end