Sha256: e02a34b2beb4b533a2f17307a80cb071902c910e05d12720fd53412357fc4ff3

Contents?: true

Size: 312 Bytes

Versions: 22

Compression:

Stored size: 312 Bytes

Contents

module Paperclip
  module Interpolations
    class PluralCache
      def initialize
        @cache = {}
      end

      def pluralize(word)
        @cache[word] ||= word.pluralize
      end

      def underscore_and_pluralize(word)
        @cache[word] ||= word.underscore.pluralize
      end
    end
  end
end

Version data entries

22 entries across 20 versions & 2 rubygems

Version Path
paperclip-4.3.1 lib/paperclip/interpolations/plural_cache.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/paperclip-4.2.4/lib/paperclip/interpolations/plural_cache.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/paperclip-4.2.4/lib/paperclip/interpolations/plural_cache.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.2/lib/paperclip/interpolations/plural_cache.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.3/lib/paperclip/interpolations/plural_cache.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.4/lib/paperclip/interpolations/plural_cache.rb
paperclip-4.3.0 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.2.4 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.2.3 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.2.2 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.2.1 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.2.0 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.1.1 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.1.0 lib/paperclip/interpolations/plural_cache.rb
paperclip-3.5.4 lib/paperclip/interpolations/plural_cache.rb
paperclip-4.0.0 lib/paperclip/interpolations/plural_cache.rb
paperclip-3.5.3 lib/paperclip/interpolations/plural_cache.rb
paperclip-3.5.2 lib/paperclip/interpolations/plural_cache.rb
paperclip-3.5.1 lib/paperclip/interpolations/plural_cache.rb
paperclip-3.5.0 lib/paperclip/interpolations/plural_cache.rb