Sha256: d56251424b489666bcec4416379409d59fdeba136d8a7dedfd73b7aa8cb391c0

Contents?: true

Size: 430 Bytes

Versions: 10

Compression:

Stored size: 430 Bytes

Contents

module Danconia
  class << self
    def config
      @config ||= Config.new
    end

    def config= c
      @config = c
    end

    def configure
      yield config
    end
  end

  class Config
    attr_accessor :default_currency, :default_exchange, :available_currencies

    def initialize
      @default_currency = 'USD'
      @default_exchange = Exchanges::FixedRates.new
      @available_currencies = []
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
danconia-0.4.0 lib/danconia/config.rb
danconia-0.3.1 lib/danconia/config.rb
danconia-0.3.0 lib/danconia/config.rb
danconia-0.2.9 lib/danconia/config.rb
danconia-0.2.8 lib/danconia/config.rb
danconia-0.2.7 lib/danconia/config.rb
danconia-0.2.6 lib/danconia/config.rb
danconia-0.2.5 lib/danconia/config.rb
danconia-0.2.4 lib/danconia/config.rb
danconia-0.2.3 lib/danconia/config.rb