Sha256: 0eb81481a54e55a956bd164624063639a56fe1db4e453d844851746f96d83cdf

Contents?: true

Size: 595 Bytes

Versions: 2

Compression:

Stored size: 595 Bytes

Contents

require 'mixlib/config'

# Provides a class-based configuration object.
# See https://github.com/opscode/mixlib-config
class Calamum::Config
  extend Mixlib::Config

  def self.inspect
    configuration.inspect
  end

  def self.apply(config)
    merge!(config)

    self.doc_path = File.join(config[:path], 'docs')
    self.tpl_path = File.join(File.dirname(__FILE__),
                              'templates',
                              config[:template])
    unless Calamum::VALID_TEMPLATES.include?(config[:template])
      fail "Unknown template #{config[:template]}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
calamum-1.2.2 lib/calamum/config.rb
calamum-1.2.1 lib/calamum/config.rb