Class: Cldr::Export::Ruby
- Inherits:
-
Object
- Object
- Cldr::Export::Ruby
- Defined in:
- lib/cldr/export/ruby.rb
Instance Method Summary collapse
Instance Method Details
#export(locale, component, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/cldr/export/ruby.rb', line 4 def export(locale, component, = {}) data = Export.data(component, locale, ) data = data.to_ruby if data.respond_to?(:to_ruby) unless data.empty? path = Export.path(locale, component, 'rb') Export.write(path, data) yield(component, locale, path) if block_given? data end end |