Sha256: 72203345a6f9cae88c6200d02df38853eb5f7cb7a4a048b64a4e208733ce2e33

Contents?: true

Size: 288 Bytes

Versions: 2

Compression:

Stored size: 288 Bytes

Contents

require 'yaml'

module Ktct
  module Config
    def config
      return @config if @config
      config_file_name = options[:config]
      yaml = YAML.load(File.read(File.expand_path(config_file_name)))
      env = ENV['KTCT_ENV'] || yaml['default_env']
      yaml[env]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ktct-0.1.1 lib/ktct/config.rb
ktct-0.1.0 lib/ktct/config.rb