Sha256: 75aaec0d608fe68d33ba14b52149126d8c2a4cf19117c7e541f34ce03a65ad5f
Contents?: true
Size: 527 Bytes
Versions: 1
Compression:
Stored size: 527 Bytes
Contents
require "figly/version" require "figly/settings" module Figly def self.setup(path) raise "File does not exist: #{path}" unless File.exists?(path) ext = File.extname(path) @@data = case ext when '.toml' require 'toml' TOML.load_file(path) when '.yml' require 'yaml' YAML.load_file(path) when '.json' require 'json' JSON.parse(File.read(path)) else raise "Unsupported file extension (#{ext})" end @@data end def self.data @@data end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
figly-1.0.1 | lib/figly.rb |