lib/jekyll-maps/location_finder.rb in jekyll-maps-2.0.4 vs lib/jekyll-maps/location_finder.rb in jekyll-maps-2.1.0

- old
+ new

@@ -10,12 +10,12 @@ if @options[:attributes][:latitude] && @options[:attributes][:longitude] return [location_from_options(page)] elsif @options[:filters].empty? @documents << page if with_location?(page) else - site.collections.each { |_, collection| filter(collection.docs) } - site_data(site).each { |_, items| traverse(items) } + site.collections.each_value { |collection| filter(collection.docs) } + site_data(site).each_value { |items| traverse(items) } end documents_to_locations end @@ -53,10 +53,10 @@ private def traverse(items) return filter(items) if items.is_a?(Array) - items.each { |_, children| traverse(children) } if items.is_a?(Hash) + items.each_value { |children| traverse(children) } if items.is_a?(Hash) end private def filter(docs) docs.each do |doc|