Sha256: e4aa3d4dd077782f9d4d082093376438e68976b91012fa1116c4b58fc0b35cbe

Contents?: true

Size: 716 Bytes

Versions: 13

Compression:

Stored size: 716 Bytes

Contents

module Kms
  module Functions
    module Currency
      include ::Liquor::Library

      function "currency",
                unnamed_arg: :string,
                optional_named_args: { precision: :integer,
                                       delimiter: :string,
                                       separator: :string,
                                       format:    :string,
                                       unit:      :string } do |arg, kw|
       options = {}
       [:precision, :delimiter, :separator, :format, :unit].each do |option|
           options[option] = kw[option] if kw[option]
       end
       ActiveSupport::NumberHelper.number_to_currency(arg, options)
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
kms-1.2.1 lib/kms/functions/currency.rb
kms-1.2.0 lib/kms/functions/currency.rb
kms-1.1.0 lib/kms/functions/currency.rb
kms-1.0.1 lib/kms/functions/currency.rb
kms-1.0.0 lib/kms/functions/currency.rb
kms-0.9.0 lib/kms/functions/currency.rb
kms-0.8.0 lib/kms/functions/currency.rb
kms-0.7.0 lib/kms/functions/currency.rb
kms-0.6.0 lib/kms/functions/currency.rb
kms-0.5.0 lib/kms/functions/currency.rb
kms-0.4.2 lib/kms/functions/currency.rb
kms-0.4.1 lib/kms/functions/currency.rb
kms-0.4.0 lib/kms/functions/currency.rb