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.19.2 lib/complex_config/plugins/money.rb
complex_config-0.19.1 lib/complex_config/plugins/money.rb
complex_config-0.19.0 lib/complex_config/plugins/money.rb
complex_config-0.18.2 lib/complex_config/plugins/money.rb
complex_config-0.18.1 lib/complex_config/plugins/money.rb
complex_config-0.18.0 lib/complex_config/plugins/money.rb
complex_config-0.17.1 lib/complex_config/plugins/money.rb
complex_config-0.17.0 lib/complex_config/plugins/money.rb
complex_config-0.16.0 lib/complex_config/plugins/money.rb
complex_config-0.15.1 lib/complex_config/plugins/money.rb
complex_config-0.15.0 lib/complex_config/plugins/money.rb
complex_config-0.14.1 lib/complex_config/plugins/money.rb
complex_config-0.14.0 lib/complex_config/plugins/money.rb
complex_config-0.13.3 lib/complex_config/plugins/money.rb
complex_config-0.13.2 lib/complex_config/plugins/money.rb
complex_config-0.13.1 lib/complex_config/plugins/money.rb
complex_config-0.13.0 lib/complex_config/plugins/money.rb
complex_config-0.12.1 lib/complex_config/plugins/money.rb
complex_config-0.12.0 lib/complex_config/plugins/money.rb
complex_config-0.11.3 lib/complex_config/plugins/money.rb