Sha256: a6fc1a100f54732a370361cabec042c38140a4fc43f0b108254cf73cdeb9c182

Contents?: true

Size: 403 Bytes

Versions: 47

Compression:

Stored size: 403 Bytes

Contents

require 'cl/config/env'
require 'cl/config/files'
require 'cl/helper'

class Cl
  class Config
    include Merge

    attr_reader :name, :opts

    def initialize(name)
      @name = name
      @opts = load
    end

    def to_h
      opts
    end

    private

      def load
        merge(*sources.map(&:load))
      end

      def sources
        [Files.new(name), Env.new(name)]
      end
  end
end

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
travis-cl-1.2.4 lib/cl/config.rb
cl-1.2.4 lib/cl/config.rb
cl-1.2.3 lib/cl/config.rb
cl-1.2.2 lib/cl/config.rb
cl-1.2.1 lib/cl/config.rb
cl-1.2.0 lib/cl/config.rb
cl-1.1.5 lib/cl/config.rb
cl-1.1.4 lib/cl/config.rb
cl-1.1.3 lib/cl/config.rb
cl-1.1.2 lib/cl/config.rb
cl-1.1.1 lib/cl/config.rb
cl-1.1.0 lib/cl/config.rb
cl-1.0.5 lib/cl/config.rb
cl-1.0.4 lib/cl/config.rb
cl-1.0.3 lib/cl/config.rb
cl-1.0.2 lib/cl/config.rb
cl-1.0.1 lib/cl/config.rb
cl-1.0.0 lib/cl/config.rb
cl-0.1.28 lib/cl/config.rb
cl-0.1.27 lib/cl/config.rb