Class: Money::Formatter::DecimalMark
- Inherits:
-
Object
- Object
- Money::Formatter::DecimalMark
- Includes:
- Money::Formatter
- Defined in:
- lib/money/formatter/decimal_mark.rb
Instance Method Summary collapse
- #class_format ⇒ Object
-
#initialize(options) ⇒ DecimalMark
constructor
A new instance of DecimalMark.
- #next_formatter ⇒ Object
Methods included from Money::Formatter
#format, #formatted, #method_missing, #rules
Constructor Details
#initialize(options) ⇒ DecimalMark
Returns a new instance of DecimalMark.
4 5 6 |
# File 'lib/money/formatter/decimal_mark.rb', line 4 def initialize() @options = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Money::Formatter
Instance Method Details
#class_format ⇒ Object
8 9 10 11 12 |
# File 'lib/money/formatter/decimal_mark.rb', line 8 def class_format return formatted if rule_decimal_mark === false return add_mark if cents > 0 return formatted end |
#next_formatter ⇒ Object
14 15 16 |
# File 'lib/money/formatter/decimal_mark.rb', line 14 def next_formatter Money::Formatter::DisplayFree end |