Class: Settings
- Inherits:
-
Object
- Object
- Settings
- Defined in:
- lib/teuton-get/settings.rb
Defined Under Namespace
Classes: Environment
Constant Summary collapse
- CONFIGFILE =
"repos.ini"
- INDEXFILENAME =
"tt-repo.yaml"
- INFOFILENAME =
"tt-info.yaml"
- MAGICNUMBER =
999
- SEPARATOR =
":"
Class Method Summary collapse
Class Method Details
.get(key) ⇒ Object
8 9 10 11 12 |
# File 'lib/teuton-get/settings.rb', line 8 def self.get(key) return @env.get(key) if key.instance_of? String @params[key] || "NODATA" end |
.init_params ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/teuton-get/settings.rb', line 24 def self.init_params @params = {} home = get("HOME") config_dirpath = File.join(home, ".config", "teuton") @params[:config_dirpath] = config_dirpath filename = CONFIGFILE config_filepath = File.join(config_dirpath, filename) @params[:config_filepath] = config_filepath cache_dirpath = File.join(config_dirpath, "cache") @params[:cache_dirpath] = cache_dirpath end |