]> git.openstreetmap.org Git - rails.git/blob - lib/osm_community_index/resource_backend.rb
Switch to using FrozenRecord for loading communities
[rails.git] / lib / osm_community_index / resource_backend.rb
1 # A backend for FrozenRecord
2
3 module OsmCommunityIndex
4   module ResourceBackend
5     def self.filename(_model)
6       "resources.json"
7     end
8
9     def self.load(file_path)
10       resources = JSON.parse(File.read(file_path))
11       resources["resources"].values
12     end
13   end
14 end