module Samus

Constants

CONFIG_PATH
VERSION

Public Instance Methods

config_paths() click to toggle source
# File lib/samus.rb, line 15
def config_paths; @@config_paths end
error(msg) click to toggle source
# File lib/samus.rb, line 36
def error(msg)
  puts "[E] #{msg}"
  exit(1)
end
load_commands() click to toggle source
# File lib/samus.rb, line 29
def load_commands
  config_paths.each do |path|
    path = File.join(path, 'commands')
    Samus::Command.command_paths.unshift(path) if File.directory?(path)
  end
end
load_configuration_directory() click to toggle source
# File lib/samus.rb, line 19
def load_configuration_directory
  if File.exist?(CONFIG_PATH)
    Dir.foreach(CONFIG_PATH) do |dir|
      next if dir == '.' || dir == '..'
      dir = File.join(CONFIG_PATH, dir)
      config_paths.unshift(dir) if File.directory?(dir)
    end
  end
end
windows?() click to toggle source
# File lib/samus.rb, line 41
def windows?
  ::RbConfig::CONFIG['host_os'] =~ /mingw|win32|cygwin/ ? true : false
end