Sha256: e5d0888a537381803d77f4f7501b2d8ecc6acd890d89276975322f09c5190221

Contents?: true

Size: 421 Bytes

Versions: 9

Compression:

Stored size: 421 Bytes

Contents

require 'yaml'
#
# MKIt::Config.load_yml!('samples/mkit.yml')
# MKIt::Config.application.services
#  requires Hash.to_o
module MKIt
  module Config
    extend self

    def load_yml!(path)
      @config_file = path
      @config = YAML.load(File.new(path).read).to_o
    end

    def config_file
      @config_file
    end
    # 
    def method_missing(name,*args)
      return @config.send(name,*args)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mkit-0.9.0 lib/mkit/config/config.rb
mkit-0.8.0 lib/mkit/config/config.rb
mkit-0.7.2 lib/mkit/config/config.rb
mkit-0.7.1 lib/mkit/config/config.rb
mkit-0.7.0 lib/mkit/config/config.rb
mkit-0.6.3 lib/mkit/config/config.rb
mkit-0.6.2 lib/mkit/config/config.rb
mkit-0.6.1 lib/mkit/config/config.rb
mkit-0.6.0 lib/mkit/config/config.rb