Module: Cldr
- Defined in:
- lib/cldr/export/data/timezones.rb,
lib/cldr.rb,
lib/cldr/data.rb,
lib/cldr/thor.rb,
lib/cldr/export.rb,
lib/cldr/format.rb,
lib/cldr/download.rb,
lib/cldr/export/code.rb,
lib/cldr/export/data.rb,
lib/cldr/export/ruby.rb,
lib/cldr/export/yaml.rb,
lib/cldr/format/date.rb,
lib/cldr/format/time.rb,
lib/cldr/format/decimal.rb,
lib/cldr/format/percent.rb,
lib/cldr/format/currency.rb,
lib/cldr/format/datetime.rb,
lib/cldr/export/data/base.rb,
lib/cldr/export/data/units.rb,
lib/cldr/export/data/numbers.rb,
lib/cldr/export/data/plurals.rb,
lib/cldr/format/decimal/base.rb,
lib/cldr/format/datetime/base.rb,
lib/cldr/export/data/calendars.rb,
lib/cldr/export/data/languages.rb,
lib/cldr/format/decimal/number.rb,
lib/cldr/export/data/currencies.rb,
lib/cldr/export/data/delimiters.rb,
lib/cldr/format/decimal/integer.rb,
lib/cldr/export/data/territories.rb,
lib/cldr/format/decimal/fraction.rb,
lib/cldr/export/data/plurals/rules.rb,
lib/cldr/export/data/plurals/grammar.rb,
lib/cldr/export/data/calendars/gregorian.rb
Overview
unicode.org/draft/reports/tr35/tr35.html#Language_Plural_Rules
condition = and_condition (‘or’ and_condition)* and_condition = relation (‘and’ relation)* relation = is_relation | in_relation | within_relation | ‘n’ <EOL> is_relation = expr ‘is’ (‘not’)? value in_relation = expr (‘not’)? ‘in’ range within_relation = expr (‘not’)? ‘within’ range expr = ‘n’ (‘mod’ value)? value = digit+ digit = 0|1|2|3|4|5|6|7|8|9 range = value’..‘value
Defined Under Namespace
Modules: Data, Export, Format Classes: Thor
Class Method Summary collapse
Class Method Details
.download(source = nil, target = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cldr/download.rb', line 8 def download(source = nil, target = nil) source ||= 'http://unicode.org/Public/cldr/21/core.zip' target ||= File.('./vendor/cldr') source = URI.parse(source) tempfile = Tempfile.new('cldr-core') system("curl #{source} -o #{tempfile.path}") FileUtils.mkdir_p(target) system("unzip #{tempfile.path} -d #{target}") end |