Class: NumbersAndWords::Strategies::FiguresConverter::Options::En::Ordinal
- Inherits:
-
Object
- Object
- NumbersAndWords::Strategies::FiguresConverter::Options::En::Ordinal
- Defined in:
- lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb
Direct Known Subclasses
NumbersAndWords::Strategies::FiguresConverter::Options::EnGb::Ordinal
Constant Summary collapse
- ZERO_TYPE =
:zero
- HUNDRED_TYPE =
:hundreds
- MEGS_TYPE =
:megs
Instance Method Summary collapse
-
#initialize(proxy, *args, &block) ⇒ Ordinal
constructor
A new instance of Ordinal.
- #result(type) ⇒ Object
Constructor Details
#initialize(proxy, *args, &block) ⇒ Ordinal
Returns a new instance of Ordinal.
11 12 13 14 |
# File 'lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb', line 11 def initialize proxy, *args, &block @strategy = proxy.strategy @options = proxy. end |
Instance Method Details
#result(type) ⇒ Object
16 17 18 19 |
# File 'lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb', line 16 def result type @type = type MEGS_TYPE != type ? check_simple_numbers : check_megs_numbers end |