Module: Jat::Plugins::SimpleApiMapsCache
- Defined in:
- lib/jat/plugins/simple_api/plugins/simple_api_maps_cache/simple_api_maps_cache.rb
Defined Under Namespace
Modules: MapsCacheClassMethods
Class Method Summary
collapse
Class Method Details
.after_load(jat_class, **opts) ⇒ Object
20
21
22
|
# File 'lib/jat/plugins/simple_api/plugins/simple_api_maps_cache/simple_api_maps_cache.rb', line 20
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
14
|
# File 'lib/jat/plugins/simple_api/plugins/simple_api_maps_cache/simple_api_maps_cache.rb', line 10
def self.before_load(jat_class, **_opts)
return if jat_class.plugin_used?(:simple_api)
raise Error, "Please load :simple_api plugin first"
end
|
.load(jat_class, **_opts) ⇒ Object
16
17
18
|
# File 'lib/jat/plugins/simple_api/plugins/simple_api_maps_cache/simple_api_maps_cache.rb', line 16
def self.load(jat_class, **_opts)
jat_class::Map.extend(MapsCacheClassMethods)
end
|
.plugin_name ⇒ Object
6
7
8
|
# File 'lib/jat/plugins/simple_api/plugins/simple_api_maps_cache/simple_api_maps_cache.rb', line 6
def self.plugin_name
:simple_api_maps_cache
end
|