Method: ConfCtl::UserScripts.load_scripts

Defined in:
lib/confctl/user_scripts.rb

.load_scriptsObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/confctl/user_scripts.rb', line 3

def self.load_scripts
  dir = ConfDir.user_script_dir

  begin
    files = Dir.entries(dir)
  rescue Errno::ENOENT
    return
  end

  files.each do |f|
    abs_path = File.join(dir, f)
    next unless File.file?(abs_path)

    load(abs_path)
  end
end