Skip to content

Commit

Permalink
A few fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Dutro committed Jan 30, 2014
1 parent 0b5df2f commit 9f38ba3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/cldr/export/data/segments_root.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9f38ba3

Please sign in to comment.