Class: Cldr::Export::Data::Delimiters
- Defined in:
- lib/cldr/export/data/delimiters.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(locale) ⇒ Delimiters
constructor
A new instance of Delimiters.
- #quotes(type) ⇒ Object
Methods inherited from Base
Methods inherited from Hash
#deep_merge, #deep_stringify_keys, #symbolize_keys
Constructor Details
#initialize(locale) ⇒ Delimiters
Returns a new instance of Delimiters.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/cldr/export/data/delimiters.rb', line 5 def initialize(locale) super update( :delimiters => { :quotes => { :default => quotes('quotation'), :alternate => quotes('alternateQuotation') } } ) end |
Instance Method Details
#quotes(type) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/cldr/export/data/delimiters.rb', line 17 def quotes(type) start = select("delimiters/#{type}Start").first end_ = select("delimiters/#{type}End").first result = {} result[:start] = start.content if start result[:end] = end_.content if end_ result end |