Module: JekyllMoney::Core

Extended by:
Core
Included in:
Core
Defined in:
lib/jekyll-money/core.rb

Instance Method Summary collapse

Instance Method Details

#money(value, currency = "USD", options = {}) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/jekyll-money/core.rb', line 10

def money(value, currency = "USD", options = {})
  @defaults = defaults unless defined?(@defaults)
  @options = @defaults.merge(options)

  value = validate_money!(value, currency)
  format_money(value, currency, options)
end