Sha256: 7231e51092ff21b9e4483e04136dc179e92ac609416db80309a3cd6493b551d8

Contents?: true

Size: 512 Bytes

Versions: 2

Compression:

Stored size: 512 Bytes

Contents

# frozen_string_literal: true

module Handlebarsjs
  module Helpers
    # Inflection handling routines, eg. pluralize, singular, ordinalize
    module Inflection
      # PluralizeByNumber: Returns the plural form of the word based on a count
      class PluralizeByNumber < Handlebarsjs::BaseHelper
        register_cmdlet(Cmdlet::Inflection::PluralizeByNumber)

        def to_proc
          ->(value, count, format, _opts) { wrapper(cmdlet.call(value, count, format)) }
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
handlebarsjs-0.5.3 lib/handlebarsjs/helpers/inflection/pluralize_by_number.rb
handlebarsjs-0.5.2 lib/handlebarsjs/helpers/inflection/pluralize_by_number.rb