Class: Money::Formatter::NoCents
- Inherits:
-
Object
- Object
- Money::Formatter::NoCents
- Includes:
- Money::Formatter
- Defined in:
- lib/money/formatter/no_cents.rb
Instance Method Summary collapse
- #class_format ⇒ Object
-
#initialize(options) ⇒ NoCents
constructor
A new instance of NoCents.
- #next_formatter ⇒ Object
Methods included from Money::Formatter
#format, #formatted, #method_missing, #rules
Constructor Details
#initialize(options) ⇒ NoCents
Returns a new instance of NoCents.
4 5 6 |
# File 'lib/money/formatter/no_cents.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 13 |
# File 'lib/money/formatter/no_cents.rb', line 8 def class_format if rules return unit if rules[:no_cents] end return formatted end |
#next_formatter ⇒ Object
15 16 17 |
# File 'lib/money/formatter/no_cents.rb', line 15 def next_formatter nil end |