Class: Cldr::Export::Data::Layout

Inherits:
Base
  • Object
show all
Defined in:
lib/cldr/export/data/layout.rb

Instance Attribute Summary

Attributes inherited from Base

#locale

Instance Method Summary collapse

Methods inherited from Base

#[]=, #update

Methods inherited from Hash

#deep_merge, #deep_stringify_keys, #symbolize_keys

Constructor Details

#initialize(locale) ⇒ Layout

Returns a new instance of Layout.



5
6
7
8
# File 'lib/cldr/export/data/layout.rb', line 5

def initialize(locale)
  super
  update(:layout => layout)
end

Instance Method Details

#layoutObject



10
11
12
13
14
15
16
17
18
# File 'lib/cldr/export/data/layout.rb', line 10

def layout
  result = { :orientation => { :character_order => nil } }

  if node = select("layout/orientation/characterOrder/text()").first
    result[:orientation][:character_order] = node.text
  end

  result
end