Sha256: 49b67a1ad01a6a68cc737704af1ba621f60faf43fdece4013aac8791be345842

Contents?: true

Size: 334 Bytes

Versions: 6

Compression:

Stored size: 334 Bytes

Contents

# frozen_string_literal: true

require 'yaml'
require 'active_support/core_ext/hash'

# frozen_string_literal: true
module Checkoff
  # Load configuration file
  class ConfigLoader
    def self.load(sym)
      file = "#{sym}.yml"
      YAML.load_file(File.expand_path("~/.#{file}"))
        .with_indifferent_access
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
checkoff-0.3.1 lib/checkoff/config_loader.rb
checkoff-0.3.0 lib/checkoff/config_loader.rb
checkoff-0.2.0 lib/checkoff/config_loader.rb
checkoff-0.1.7 lib/checkoff/config_loader.rb
checkoff-0.1.6 lib/checkoff/config_loader.rb
checkoff-0.1.5 lib/checkoff/config_loader.rb