Sha256: d055653a76b28e4de5b04a94a34dc4587f9008d729280394684880dcce765dba
Contents?: true
Size: 418 Bytes
Versions: 2
Compression:
Stored size: 418 Bytes
Contents
# frozen_string_literal: true class Fcom::ConfigFileOptions extend Memoist def initialize @options = if config_file_exists? YAML.load_file(config_file_path) else {} end end def repo @options['repo'] end private memoize \ def config_file_path "#{ENV.fetch('PWD')}/.fcom.yml" end def config_file_exists? File.exist?(config_file_path) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fcom-0.4.2 | lib/fcom/config_file_options.rb |
fcom-0.4.1 | lib/fcom/config_file_options.rb |