Sha256: 2bb63af81bf4cfc3efc14a0e8bcc8d5db75b4ea5a7051dea832b9997ee790634

Contents?: true

Size: 373 Bytes

Versions: 3

Compression:

Stored size: 373 Bytes

Contents

# frozen_string_literal: true

require 'active_support/inflector/methods'

class String
  def pluralize(count = nil, locale = :en)
    case locale
    when :ru
      case count
      when :many
        I18n.t('cases.')
      end
    else
      locale = count if count.is_a? Symbol
      count == 1 ? dup : ActiveSupport::Inflector.pluralize(self, locale)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tramway-0.1.2 lib/string.rb
tramway-0.1.1.1 lib/string.rb
tramway-0.1.1 lib/string.rb