Class: NumbersAndWords::Translations::Ru

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

Constant Summary

Constants inherited from Base

Base::I18N_NAMESPACE

Instance Method Summary collapse

Methods included from Extensions::FractionSignificance

#micro

Methods included from Families::Cyrillic

#hundreds, #integral, #ones, #tens_with_ones, #zero

Methods included from Families::Base

#mega, #megs, #teens, #tens, #tens_with_ones, #union, #union_separator

Methods inherited from Base

#t

Instance Method Details

#micro_prefix(capacity) ⇒ Object



13
14
15
16
17
18
# File 'lib/numbers_and_words/translations/ru.rb', line 13

def micro_prefix capacity
  case capacity
  when 2 then t(:sub_micro)[2]
  when 1 then t(:sub_micro)[1]
  end
end

#micros(capacity, number = nil, separator = ' ') ⇒ Object



7
8
9
10
11
# File 'lib/numbers_and_words/translations/ru.rb', line 7

def micros capacity, number = nil, separator = ' '
  micro, prefix = capacity
  micros = t(:micro, :count => number)[micro]
  [micro_prefix(prefix), micros].compact.join separator
end