You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey there, thanks for this great plugin. Just cam across the use case to need to subdivisionContainment. Easy access through the gem would be great.
e.g.:
module Cldr
module Export
module Data
class SubdivisionsContainment < Base
def initialize(*)
super(nil)
update(subdivision_containment: subdivision_containment)
end
def subdivision_containment
@subdivision_containment ||= doc.xpath("supplementalData/subdivisionContainment/subgroup").each_with_object(
Hash.new { |h, k| h[k] = { contains: [] } }
) do |territory, memo|
territory_id = territory.attribute("type").value
children = territory.attribute("contains").value.split(" ")
memo[territory_id][:contains].concat(children)
memo[territory_id][:contains].sort!
end
end
end
end
end
end
The text was updated successfully, but these errors were encountered:
Hey there, thanks for this great plugin. Just cam across the use case to need to subdivisionContainment. Easy access through the gem would be great.
e.g.:
The text was updated successfully, but these errors were encountered: