Sha256: 914090f4427132fe820dfa7305fa5d37de2f3bf8d0299561d70bbbb1bf962019
Contents?: true
Size: 366 Bytes
Versions: 11
Compression:
Stored size: 366 Bytes
Contents
class Freighthop::Config def self.exist? file.exist? end def self.file Freighthop.host_root.join('.freighthop.json') end def self.config @config ||= JSON.parse(file.read) end def self.fetch(*args) config.fetch(*args) end def self.write(config_hash) file.open('w') { |f| f.puts(JSON.pretty_generate(config_hash)) } end end
Version data entries
11 entries across 11 versions & 1 rubygems