Module: Sysdo::Cli

Defined in:
lib/sysdo/cli.rb

Constant Summary collapse

CONFIG_DIRECTORY =
File.join(
  ENV['XDG_CONFIG_HOME'] || File.expand_path('~/.config'),
  'sysdo',
)

Class Method Summary collapse

Class Method Details

.create_config_directoryObject



13
14
15
# File 'lib/sysdo/cli.rb', line 13

def self.create_config_directory
  FileUtils.mkdir_p(CONFIG_DIRECTORY)
end

.user_scriptsObject



8
9
10
11
# File 'lib/sysdo/cli.rb', line 8

def self.user_scripts
  create_config_directory
  Dir[File.join(CONFIG_DIRECTORY, '*.rb')]
end