Sha256: 742d77c069d338db917ba4c06cf311240c371e2b53133d8e95833e646ac73019

Contents?: true

Size: 384 Bytes

Versions: 1

Compression:

Stored size: 384 Bytes

Contents

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

class TwitterCldr.PluralRules
  @rules = `{{{rules}}}`
  @runtime = `{{{runtime}}}`
  @names = {{{names}}}

  @all: (type = 'cardinal') ->
    return @names[type]

  @rule_for: (number, type = 'cardinal') ->
    try
      return @rules[type](number.toString(), @runtime)
    catch error
      return "other"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter_cldr_js-2.4.0 lib/twitter_cldr/js/mustache/plurals/rules.coffee