Sha256: 4c5b22af9ef314fdb5eeaa22d03265bbac76e0ca6b7d287eaf31808cd2763300

Contents?: true

Size: 742 Bytes

Versions: 2

Compression:

Stored size: 742 Bytes

Contents

require 'configliere/core_ext'
require 'configliere/param'
require 'configliere/define'
require 'configliere/config_file'

module Configliere

  # delegates to Configliere::Param
  def self.new *args, &block
    Configliere::Param.new *args, &block
  end

  ALL_MIXINS = [:define, :config_file, :commandline, :encrypted, :env_var, :config_block, :git_style_binaries]
  def self.use *mixins
    mixins = ALL_MIXINS if mixins.include?(:all) || mixins.empty?
    mixins.each do |mixin|
      require "configliere/#{mixin}"
    end
  end
end

# Defines a global config object
Settings = Configliere.new unless defined?(Settings)

#
# Allows the
#   Config :this => that, :cat => :hat
# pattern.
#
def Settings *args
  Settings.defaults *args
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
configliere-0.0.9 lib/configliere.rb
configliere-0.0.8 lib/configliere.rb