Sha256: f36def38a896c10711d7735d271013e392b48d956a452a42880fcaa92ae97e5f

Contents?: true

Size: 422 Bytes

Versions: 10

Compression:

Stored size: 422 Bytes

Contents

begin
  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

10 entries across 10 versions & 1 rubygems

Version Path
complex_config-0.22.2 lib/complex_config/plugins/money.rb
complex_config-0.22.1 lib/complex_config/plugins/money.rb
complex_config-0.22.0 lib/complex_config/plugins/money.rb
complex_config-0.21.2 lib/complex_config/plugins/money.rb
complex_config-0.21.1 lib/complex_config/plugins/money.rb
complex_config-0.21.0 lib/complex_config/plugins/money.rb
complex_config-0.20.0 lib/complex_config/plugins/money.rb
complex_config-0.19.4 lib/complex_config/plugins/money.rb
complex_config-0.19.3 lib/complex_config/plugins/money.rb
complex_config-0.2.3 lib/complex_config/plugins/money.rb