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