Sha256: f9fcdc885ab621b0b503b0bf7b17a7a581a665deeab5d8838c811fd960095479
Contents?: true
Size: 469 Bytes
Versions: 11
Compression:
Stored size: 469 Bytes
Contents
class Jets::Gems::Config class Token def key data['key'] end def data load_yaml("#{ENV['HOME']}/.jets/config.yml") end # Ensure a Hash is returned def load_yaml(path) return {} unless File.exist?(path) data = YAML.load_file(path) if data.is_a?(Hash) data else puts "WARN: #{path} is not in the correct format. Loading an empty hash.".color(:yellow) {} end end end end
Version data entries
11 entries across 11 versions & 1 rubygems