Sha256: 8bf2b04555671c67409df8c19b34dbfbd0463e3ef0044513b569b4036f58c7b8

Contents?: true

Size: 759 Bytes

Versions: 21

Compression:

Stored size: 759 Bytes

Contents

module Badger
  class Config

    include Singleton

    def initialize
      reset!
    end

    def reset!
      @config   = fetch_yaml 'config'
      @services = fetch_yaml 'services'
      @licenses = fetch_yaml 'licenses'
    end

    def services
      @services
    end

    def licenses
      @licenses
    end

    def config
      @config
    end

#    def badge_type= type
#      @config['badge_type'] = type
#    end

    private

    def fetch_yaml file
      YAML.load(
          File.open(
              File.join(
                  File.dirname(__FILE__),
                  '..',
                  '..',
                  'config/%s.yaml' % [
                      file
                  ]
              )
          )
      )
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
cvss-suite-1.0.8 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
badgerbadgerbadger-0.15.0 lib/badger/config.rb
cvss-suite-1.0.7 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.6 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.5 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.4 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.3 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.2 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.1 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
cvss-suite-1.0.0 vendor/cache/ruby/2.2.0/gems/badgerbadgerbadger-0.14.0/lib/badger/config.rb
badgerbadgerbadger-0.14.0 lib/badger/config.rb
badgerbadgerbadger-0.13.0 lib/badger/config.rb
badgerbadgerbadger-0.12.0 lib/badger/config.rb
badgerbadgerbadger-0.11.2 lib/badger/config.rb
badgerbadgerbadger-0.11.1 lib/badger/config.rb
badgerbadgerbadger-0.10.2 lib/badger/config.rb
badgerbadgerbadger-0.10.1 lib/badger/config.rb
badgerbadgerbadger-0.10.0 lib/badger/config.rb
badgerbadgerbadger-0.9.0 lib/badger/config.rb
badgerbadgerbadger-0.8.3 lib/badger/config.rb