]> git.openstreetmap.org Git - rails.git/blob - lib/osm_community_index/osm_community_index.rb
475a5be67a22ae214caf6f75caff487d1d833896
[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   end
14 end