]> git.openstreetmap.org Git - rails.git/blob - lib/osm_community_index/osm_community_index.rb
Fix: local chapter filtering is duplicating the logic elsewhere in the file.
[rails.git] / lib / osm_community_index / osm_community_index.rb
1 module OsmCommunityIndex
2   class OsmCommunityIndex
3     require "yaml"
4
5     def self.community_index
6       @community_index ||= community_index_from_json
7     end
8
9     def self.community_index_from_json
10       json_file = Rails.root.join("node_modules/osm-community-index/dist/resources.json")
11       JSON.parse(File.read(json_file))
12     end
13
14   end
15 end