Class: NumbersAndWords::Strategies::FiguresConverter::Languages::Nl
- Inherits:
-
Base
- Object
- Base
- NumbersAndWords::Strategies::FiguresConverter::Languages::Nl
show all
- Defined in:
- lib/numbers_and_words/strategies/figures_converter/languages/nl.rb
Instance Attribute Summary
Attributes inherited from Base
#decorator, #figures, #language, #options, #translations
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #run
Instance Method Details
#capacity_iteration ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/nl.rb', line 12
def capacity_iteration
return super if @current_capacity != FiguresArray::THOUSAND_CAPACITY
return [] if apply_tens_of_hundreds?
return megs if figures.number_in_capacity(@current_capacity) == 1
capacity_words = words_in_capacity(@current_capacity)
capacity_words.empty? ? [] : [capacity_words, megs].join
end
|
#hundreds_number_to_words ⇒ Object
8
9
10
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/nl.rb', line 8
def hundreds_number_to_words
[super.reverse.join]
end
|
#ones(*args) ⇒ Object
21
22
23
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/nl.rb', line 21
def ones(*args)
super({ fractional_numeral: @options.options[:fractional_numeral] }.merge(args.first || {}))
end
|
#simple_number_to_words ⇒ Object
29
30
31
32
33
34
35
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/nl.rb', line 29
def simple_number_to_words
if @figures.only_ones && @figures.ones == 1 && !@options.options[:fractional_numeral]
[@translations.t(:loose_one)]
else
super
end
end
|
#tens_with_ones(*args) ⇒ Object
25
26
27
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/nl.rb', line 25
def tens_with_ones(*args)
super({ fractional_numeral: @options.options[:fractional_numeral] }.merge(args.first || {}))
end
|
#zero ⇒ Object
37
38
39
40
41
|
# File 'lib/numbers_and_words/strategies/figures_converter/languages/nl.rb', line 37
def zero
return nil if maybe_remove_zero
super
end
|