Class: NumbersAndWords::Translations::Vi

Inherits:
Base
  • Object
show all
Includes:
Extensions::FractionSignificance, Families::Latin
Defined in:
lib/numbers_and_words/translations/vi.rb

Constant Summary

Constants inherited from Base

Base::I18N_NAMESPACE

Instance Method Summary collapse

Methods included from Extensions::FractionSignificance

#micro, #micro_prefix, #micros

Methods included from Families::Latin

#hundreds, #ones, #zero

Methods included from Families::Base

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

Methods inherited from Base

#t

Instance Method Details

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



8
9
10
11
12
13
# File 'lib/numbers_and_words/translations/vi.rb', line 8

def ones_of_tens(number, options = {})
  return t('units.tens.one') if number == 1
  return t('units.tens.five') if number == 5

  ones(number, options)
end

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



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

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

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



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

def tens_with_ones(numbers, options = {})
  [tens(numbers[1]), ones_of_tens(numbers[0], options)].join options[:separator] || ' '
end