RailsI18n::Pluralization::OneUptoTwoOther

Public Class Methods

rule() click to toggle source
# File lib/rails_i18n/common_pluralizations/one_upto_two_other.rb, line 6
def self.rule
  lambda { |n| n >= 0 && n < 2 ? :one : :other }
end
with_locale(locale) click to toggle source
# File lib/rails_i18n/common_pluralizations/one_upto_two_other.rb, line 10
def self.with_locale(locale)
  { locale => {
      :'i18n' => {
        :plural => {
          :keys => [:one, :other],
          :rule => rule }}}}
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.