Class: WebMole::GatheringMode
- Inherits:
-
Object
- Object
- WebMole::GatheringMode
- Defined in:
- lib/webmole/gathering_mode.rb
Class Method Summary collapse
Class Method Details
.print_summary ⇒ Object
20 21 22 23 24 25 |
# File 'lib/webmole/gathering_mode.rb', line 20 def print_summary puts "\nGathering mode summary:".colorize(:green) @gathered_data.each do |type, matches| puts "#{type}: #{matches.size} unique entries".colorize(:cyan) end end |
.save_to_gathering(match, type) ⇒ Object
15 16 17 18 |
# File 'lib/webmole/gathering_mode.rb', line 15 def save_to_gathering(match, type) @gathered_data[type].add(match) save_data(type) end |
.setup ⇒ Object
10 11 12 13 |
# File 'lib/webmole/gathering_mode.rb', line 10 def setup FileUtils.mkdir_p(@gathering_dir) unless File.directory?(@gathering_dir) load_existing_data end |