Class: NumbersAndWords::Translations::De

Inherits:
Base
  • Object
show all
Includes:
Families::Latin
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, #teens, #tens, #union, #union_separator

Methods inherited from Base

#t

Instance Method Details

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



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

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

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



7
8
9
# File 'lib/numbers_and_words/translations/de.rb', line 7

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

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



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

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

#zero(options = {}) ⇒ Object



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

def zero options = {}
  ones 0
end