Class: Money::Formatter::CurrencyName

Inherits:
Object
  • Object
show all
Includes:
Money::Formatter
Defined in:
lib/money/formatter/currency_name.rb

Instance Method Summary collapse

Methods included from Money::Formatter

#format, #formatted, #method_missing, #rules

Constructor Details

#initialize(options) ⇒ CurrencyName

Returns a new instance of CurrencyName.



4
5
6
# File 'lib/money/formatter/currency_name.rb', line 4

def initialize(options)
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Money::Formatter

Instance Method Details

#class_formatObject



8
9
10
# File 'lib/money/formatter/currency_name.rb', line 8

def class_format
  "#{formatted} #{currency.to_s}" if rules[:with_currency]
end

#next_formatterObject



12
13
14
# File 'lib/money/formatter/currency_name.rb', line 12

def next_formatter
  Money::Formatter::CurrencySymbol
end