Module: CrawlerDetect::Library::Loader
- Included in:
- Crawlers, Exclusions, Headers
- Defined in:
- lib/crawler_detect/library/loader.rb
Overview
since 1.0.0
Instance Method Summary collapse
-
#load_raw(path) ⇒ Object
Load JSON raw file.
-
#reload_data ⇒ Object
Remove cached raw data.
Instance Method Details
#load_raw(path) ⇒ Object
Load JSON raw file
8 9 10 |
# File 'lib/crawler_detect/library/loader.rb', line 8 def load_raw(path) JSON.parse(File.read(path)) end |
#reload_data ⇒ Object
Remove cached raw data
13 14 15 |
# File 'lib/crawler_detect/library/loader.rb', line 13 def reload_data remove_instance_variable(:@data) if instance_variable_defined?(:@data) end |