Sha256: fd25dfb5e6dc8a4e22e8bc3bfd589d9d0f7043e73d3b5e118aadabac16a15201
Contents?: true
Size: 574 Bytes
Versions: 11
Compression:
Stored size: 574 Bytes
Contents
require 'yaml' require 'toolrack' module ElibMgmt module Cli class ConfigError < StandardError; end class Config include TR::CondUtils def self.load(conf) raise ConfigError, "Config file given is null" if is_empty?(conf) raise ConfigError, "Config file '#{conf}' not found" if not File.exist?(conf) Config.new(YAML.load(File.read(conf))) end def initialize(existing = { }) @rec = existing || { } end def matching_spec(outdir, spec) @rec[:sort_spec] end end end end
Version data entries
11 entries across 11 versions & 1 rubygems