Sha256: 2705b08f30137540d81a02799ae9f06db16db4064fe8f515f1b4c6e18cc08eec

Contents?: true

Size: 564 Bytes

Versions: 16

Compression:

Stored size: 564 Bytes

Contents

module RelatonBib
  module Config
    def configure
      yield configuration if block_given?
    end

    def configuration
      @configuration ||= self::Configuration.new
    end
  end

  class Configuration
    PROGNAME = "relaton-bib".freeze

    attr_accessor :logger

    def initialize
      @logger = ::Logger.new $stderr
      @logger.level = ::Logger::WARN
      @logger.progname = self.class::PROGNAME
      @logger.formatter = proc do |_severity, _datetime, progname, msg|
        "[#{progname}] #{msg}\n"
      end
    end
  end

  extend Config
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
relaton-bib-1.18.5 lib/relaton_bib/config.rb
relaton-bib-1.18.3 lib/relaton_bib/config.rb
relaton-bib-1.18.2 lib/relaton_bib/config.rb
relaton-bib-1.18.1 lib/relaton_bib/config.rb
relaton-bib-1.18.0 lib/relaton_bib/config.rb
relaton-bib-1.17.2 lib/relaton_bib/config.rb
relaton-bib-1.17.1 lib/relaton_bib/config.rb
relaton-bib-1.17.0 lib/relaton_bib/config.rb
relaton-bib-1.16.5 lib/relaton_bib/config.rb
relaton-bib-1.16.4 lib/relaton_bib/config.rb
relaton-bib-1.16.3 lib/relaton_bib/config.rb
relaton-bib-1.16.2 lib/relaton_bib/config.rb
relaton-bib-1.16.1 lib/relaton_bib/config.rb
relaton-bib-1.16.0 lib/relaton_bib/config.rb
relaton-bib-1.14.14 lib/relaton_bib/config.rb
relaton-bib-1.14.13 lib/relaton_bib/config.rb