Sha256: fbfd44b13909d32cc5071e0ce6d56192768e3e0464569a2fcd6e56d0140fbe69

Contents?: true

Size: 485 Bytes

Versions: 35

Compression:

Stored size: 485 Bytes

Contents

begin
  require 'forwardable' # XXX monetize forgets to require this
  require 'monetize'
rescue LoadError
  if $DEBUG
    warn 'Cannot load runtime dependency "monetize":"\
    " Skipping plugin ComplexConfig::Plugins::MONEY.'
  end
else
  module ComplexConfig::Plugins
    MONEY = -> id do
      if cents = ask_and_send("#{id}_in_cents")
        Money.new(cents)
      else
        skip
      end
    end
  end

  ComplexConfig::Provider.add_plugin ComplexConfig::Plugins::MONEY
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
complex_config-0.11.2 lib/complex_config/plugins/money.rb
complex_config-0.11.1 lib/complex_config/plugins/money.rb
complex_config-0.11.0 lib/complex_config/plugins/money.rb
complex_config-0.10.0 lib/complex_config/plugins/money.rb
complex_config-0.9.2 lib/complex_config/plugins/money.rb
complex_config-0.9.1 lib/complex_config/plugins/money.rb
complex_config-0.9.0 lib/complex_config/plugins/money.rb
complex_config-0.8.0 lib/complex_config/plugins/money.rb
complex_config-0.7.0 lib/complex_config/plugins/money.rb
complex_config-0.6.0 lib/complex_config/plugins/money.rb
complex_config-0.5.2 lib/complex_config/plugins/money.rb
complex_config-0.5.0 lib/complex_config/plugins/money.rb
complex_config-0.4.0 lib/complex_config/plugins/money.rb
complex_config-0.3.1 lib/complex_config/plugins/money.rb
complex_config-0.3.0 lib/complex_config/plugins/money.rb