module CrawlerDetect::Library::Loader

since 1.0.0

Public Instance Methods

load_raw(path) click to toggle source

Load JSON raw file

# File lib/crawler_detect/library/loader.rb, line 8
def load_raw(path)
  JSON.parse(File.read(path))
end
reload_data() click to toggle source

Remove cached raw data

# File lib/crawler_detect/library/loader.rb, line 13
def reload_data
  remove_instance_variable(:@data) if instance_variable_defined?(:@data)
end