Class: NumbersAndWords::Translations::Da
Constant Summary
collapse
- DEFAULT_POSTFIX =
nil
Constants inherited
from Base
Base::I18N_NAMESPACE
Instance Method Summary
collapse
#mega, #megs, #micro_separator, #teens, #union
Methods inherited from Base
#t
Instance Method Details
#hundreds(number, options = {}) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/numbers_and_words/translations/da.rb', line 25
def hundreds(number, options = {})
return t(:one_hundred) if options[:is_one_hundred]
return t(:hundreds)[number] if options[:is_hundred]
t(:hundreds)[number]
end
|
#ones(number, options = {}) ⇒ Object
10
11
12
13
14
15
|
# File 'lib/numbers_and_words/translations/da.rb', line 10
def ones(number, options = {})
return t(:common)[number] if options[:gender] == :common
return t(:neuter)[number] if options[:gender] == :neuter
t([options[:prefix], :ones, options[:postfix] || DEFAULT_POSTFIX].join('.'))[number]
end
|
#tens(number, _options = {}) ⇒ Object
17
18
19
|
# File 'lib/numbers_and_words/translations/da.rb', line 17
def tens(number, _options = {})
t(:tens)[number]
end
|
#tens_with_ones(numbers, _options = {}) ⇒ Object
21
22
23
|
# File 'lib/numbers_and_words/translations/da.rb', line 21
def tens_with_ones(numbers, _options = {})
[ones(numbers[0], { gender: :common }), tens(numbers[1])].join(union)
end
|
#zero(_options = {}) ⇒ Object
32
33
34
|
# File 'lib/numbers_and_words/translations/da.rb', line 32
def zero(_options = {})
ones 0
end
|