Module: Jat::Plugins::MapsCache

Defined in:
lib/jat/plugins/maps_cache/maps_cache.rb

Class Method Summary collapse

Class Method Details

.load(jat_class, **opts) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/jat/plugins/maps_cache/maps_cache.rb', line 10

def self.load(jat_class, **opts)
  if jat_class.plugin_used?(:json_api)
    jat_class.plugin :json_api_maps_cache, **opts
  elsif jat_class.plugin_used?(:simple_api)
    jat_class.plugin :simple_api_maps_cache, **opts
  else
    raise Error, "Please load :json_api or :simple_api plugin first"
  end
end

.plugin_nameObject



6
7
8
# File 'lib/jat/plugins/maps_cache/maps_cache.rb', line 6

def self.plugin_name
  :maps_cache
end