Class: NumbersAndWords::Translations::Vi
Constant Summary
Constants inherited
from Base
Base::I18N_NAMESPACE
Instance Method Summary
collapse
#micro, #micro_prefix, #micros
#hundreds, #ones, #zero
#mega, #megs, #micro_separator, #teens, #tens, #union
Methods inherited from Base
#t
Instance Method Details
#ones_of_tens(number, options = {}) ⇒ Object
6
7
8
9
10
|
# File 'lib/numbers_and_words/translations/vi.rb', line 6
def ones_of_tens(number, options = {})
return t(%i[units tens one].join('.')) if number == 1
return t(%i[units tens five].join('.')) if number == 5
ones(number, options)
end
|
#ones_union(number, options = {}) ⇒ Object
16
17
18
|
# File 'lib/numbers_and_words/translations/vi.rb', line 16
def ones_union(number, options = {})
[t(:ones_union), ones(number, options)].join options[:separator] || ' '
end
|
#tens_with_ones(numbers, options = {}) ⇒ Object
12
13
14
|
# File 'lib/numbers_and_words/translations/vi.rb', line 12
def tens_with_ones(numbers, options = {})
[tens(numbers[1]), ones_of_tens(numbers[0], options)].join options[:separator] || ' '
end
|