Class: NumbersAndWords::Translations::Nl

Inherits:
Base
  • Object
show all
Includes:
Extensions::FractionSignificance, Families::Latin
Defined in:
lib/numbers_and_words/translations/nl.rb

Constant Summary

Constants inherited from Base

Base::I18N_NAMESPACE

Instance Method Summary collapse

Methods included from Extensions::FractionSignificance

#micro, #micro_prefix, #micros

Methods included from Families::Latin

#zero

Methods included from Families::Base

#mega, #megs, #micro_separator, #teens, #tens

Methods inherited from Base

#t

Instance Method Details

#hundreds(number, _options = {}) ⇒ Object



22
23
24
25
26
# File 'lib/numbers_and_words/translations/nl.rb', line 22

def hundreds(number, _options = {})
  return t(:hundreds) if number == 1

  super(number, separator: '')
end

#ones(number, options = {}) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/numbers_and_words/translations/nl.rb', line 9

def ones(number, options = {})
  # In fractional context, use "een" instead of "één" for number 1
  if number == 1 && options[:fractional_numeral]
    t(:ones)[1] # "een" is at index 1 in the ones array
  else
    super
  end
end

#tens_with_ones(numbers, options = {}) ⇒ Object



18
19
20
# File 'lib/numbers_and_words/translations/nl.rb', line 18

def tens_with_ones(numbers, options = {})
  [ones(numbers[0], options), tens(numbers[1])].join(union(numbers[0]))
end