Class: Bookworm::Crawler

Inherits:
Object
  • Object
show all
Defined in:
lib/bookworm/crawler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, keys: []) ⇒ Crawler

Returns a new instance of Crawler.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/bookworm/crawler.rb', line 27

def initialize(config, keys: [])
  @config = config
  @intake_queue = {}
  @processed_files = {}

  # TODO(dcrosby) add messages to verbose mode
  keys.each do |key|
    generate_file_queue(key)
    process_paths(key)
  end
end

Instance Attribute Details

#processed_filesObject (readonly)

Returns the value of attribute processed_files.



25
26
27
# File 'lib/bookworm/crawler.rb', line 25

def processed_files
  @processed_files
end