Module: Jat::Plugins::JsonApiMapsCache
- Defined in:
- lib/jat/plugins/json_api/plugins/json_api_maps_cache/json_api_maps_cache.rb
Defined Under Namespace
Modules: MapsCacheClassMethods
Class Method Summary
collapse
Class Method Details
.after_load(jat_class, **opts) ⇒ Object
19
20
21
|
# File 'lib/jat/plugins/json_api/plugins/json_api_maps_cache/json_api_maps_cache.rb', line 19
def self.after_load(jat_class, **opts)
jat_class.config[:cached_maps_count] = opts[:cached_maps_count] || 100
end
|
.before_load(jat_class, **opts) ⇒ Object
10
11
12
13
|
# File 'lib/jat/plugins/json_api/plugins/json_api_maps_cache/json_api_maps_cache.rb', line 10
def self.before_load(jat_class, **opts)
return if jat_class.plugin_used?(:json_api)
raise Error, "Please load :json_api plugin first"
end
|
.load(jat_class, **_opts) ⇒ Object
15
16
17
|
# File 'lib/jat/plugins/json_api/plugins/json_api_maps_cache/json_api_maps_cache.rb', line 15
def self.load(jat_class, **_opts)
jat_class::Map.extend(MapsCacheClassMethods)
end
|
.plugin_name ⇒ Object
6
7
8
|
# File 'lib/jat/plugins/json_api/plugins/json_api_maps_cache/json_api_maps_cache.rb', line 6
def self.plugin_name
:json_api_maps_cache
end
|