Class: NumbersAndWords::Strategies::FiguresConverter::Options::En::Ordinal

Inherits:
Object
  • Object
show all
Defined in:
lib/numbers_and_words/strategies/figures_converter/options/en/ordinal.rb

Constant Summary collapse

ZERO_TYPE =
:zero
HUNDRED_TYPE =
:hundreds
MEGS_TYPE =
:megs

Instance Method Summary collapse

Constructor Details

#initialize(proxy, *_args) ⇒ 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)
  @strategy = proxy.strategy
  @options = proxy.options
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