Sha256: 9f02d83174870da233a6b10a03a8e6b8df225ad31211ba29be38a3c50933e870

Contents?: true

Size: 820 Bytes

Versions: 4

Compression:

Stored size: 820 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

  # Base class for Configliere errors.
  Error = Class.new(StandardError)
  
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

4 entries across 4 versions & 1 rubygems

Version Path
configliere-0.2.2 lib/configliere.rb
configliere-0.2.1 lib/configliere.rb
configliere-0.1.1 lib/configliere.rb
configliere-0.1.0 lib/configliere.rb