Class: NumbersAndWords::Translations::De

Inherits:
Base
  • Object
show all
Includes:
Families::Base
Defined in:
lib/numbers_and_words/translations/de.rb

Constant Summary collapse

DEFAULT_POSTFIX =
:combine

Constants inherited from Base

Base::I18N_NAMESPACE

Instance Method Summary collapse

Methods included from Families::Base

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

Methods inherited from Base

#t

Instance Method Details

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



17
18
19
# File 'lib/numbers_and_words/translations/de.rb', line 17

def hundreds(number, _options = {})
  [ones(number), t(:hundreds)].join
end

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



9
10
11
# File 'lib/numbers_and_words/translations/de.rb', line 9

def ones(number, options = {})
  t([options[:prefix], :ones, options[:postfix] || DEFAULT_POSTFIX].join('.'))[number]
end

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



13
14
15
# File 'lib/numbers_and_words/translations/de.rb', line 13

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

#zero(_options = {}) ⇒ Object



21
22
23
# File 'lib/numbers_and_words/translations/de.rb', line 21

def zero(_options = {})
  ones 0
end