openstreetmap-website/lib/osm_community_index.rb
Andy Allan 1bcde09125 Unnest OsmCommunityIndex
No need for OsmCommunityIndex::OsmCommunityIndex.foo
2022-03-02 16:23:07 +00:00

12 lines
300 B
Ruby

module OsmCommunityIndex
require "yaml"
def self.community_index
@community_index ||= community_index_from_json
end
def self.community_index_from_json
json_file = Rails.root.join("node_modules/osm-community-index/dist/resources.json")
JSON.parse(File.read(json_file))
end
end