Class: R18n::Locales::Ru
- Inherits:
-
R18n::Locale
- Object
- R18n::Locale
- R18n::Locales::Ru
- Defined in:
- lib/r18n-core/locales/ru.rb
Overview
Russian locale
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from R18n::Locale
#code, #downcased_code, #language, #parent, #region
Instance Method Summary collapse
Methods inherited from R18n::Locale
#==, capitalize, exists?, #format_date_full, #format_date_human, #format_date_standard, #format_float, #format_integer, #format_time, #format_time_full, #format_time_human, #format_time_standard, #initialize, #inspect, load, #localize, #ltr?, #month_abbrs, #month_standalone, sanitize_code, set, #strftime, #supported?, #wday_abbrs
Constructor Details
This class inherits a constructor from R18n::Locale
Instance Method Details
#pluralize(number) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/r18n-core/locales/ru.rb', line 33 def pluralize(number) if number.zero? 0 elsif number % 10 == 1 && number % 100 != 11 1 elsif (2..4).cover?(number % 10) && !(10..19).cover?(number % 100) 2 else 'n' end end |