Permalink
Browse files

A few fixes

  • Loading branch information...
1 parent 0b5df2f commit 9f38ba349592dd12592d217620d9c8054ca2d488 Cameron Dutro committed Jan 30, 2014
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/cldr/export/data/segments_root.rb
@@ -9,7 +9,7 @@ def initialize
end
def segmentations
- doc.xpath("segmentations/segmentation").inject({}) do |ret, seg|
+ doc.xpath("ldml/segmentations/segmentation").inject({}) do |ret, seg|
type = seg.attribute("type").value
ret[type] = segmentation(seg)
ret
@@ -33,16 +33,16 @@ def variables(node)
end
def rules(node)
- (node / "segmentRules" / "rule").each do |rule|
+ (node / "segmentRules" / "rule").map do |rule|
{
- :id => variable.attribute("id").value,
- :value => variable.text
+ :id => rule.attribute("id").value,
+ :value => rule.text
}
end
end
def path
- @path ||= "#{Cldr::Export::Data.dir}/common/segments/root.xml"
+ @path ||= "#{Cldr::Export::Data.dir}/segments/root.xml"
end
end

0 comments on commit 9f38ba3

Please sign in to comment.