Sha256: 3835635e0f0ade51dae8648f23c790cdea2dbac0f82a04f116e545689e0c4162

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

require 'singleton'

module Spigot
  class Configuration
    include Singleton

    attr_accessor :options_key, :logger, :map

    @@defaults = {
      options_key: 'options',
      logger: nil,
      map: nil
    }

    def self.defaults
      @@defaults
    end

    def initialize
      reset
    end

    def reset
      @@defaults.each_pair { |k, v| send("#{k}=", v) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spigot-0.3.3 lib/spigot/configuration.rb
spigot-0.3.2 lib/spigot/configuration.rb
spigot-0.3.1 lib/spigot/configuration.rb
spigot-0.3.0 lib/spigot/configuration.rb