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



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

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

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



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

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

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



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

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

#zero(_options = {}) ⇒ Object



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

def zero(_options = {})
  ones 0
end