module CrawlStation::Concerns::AdapterConcern
Public Instance Methods
adapter()
click to toggle source
# File lib/crawl_station/concerns/adapter_concern.rb, line 8 def adapter return @_adapter if @_adapter self.adapter = :memory @_adapter end
custom_adapter(adapter_name, adapter_module)
click to toggle source
# File lib/crawl_station/concerns/adapter_concern.rb, line 14 def custom_adapter(adapter_name, adapter_module) case adapter_name when String, Symbol adapter_full_name = "#{adapter_name}_adapter" @_adapter = adapter_module.const_get(adapter_full_name.camelize).new end rescue NameError => e CS.logger.error "Cache missing adapter #{adapter_name}" end