Class: Readorder::Commands::Analyze
- Inherits:
-
Readorder::Command
- Object
- Readorder::Command
- Readorder::Commands::Analyze
- Defined in:
- lib/readorder/commands/analyze.rb
Overview
Analyze the list of files to sort and give a report
Instance Attribute Summary
Attributes inherited from Readorder::Command
#analyzer, #filelist, #options, #output
Instance Method Summary collapse
Methods inherited from Readorder::Command
#after, #before, command_name, #command_name, commands, #error, find, #get_physical?, inherited, #initialize, #logger, #results, #results_dbfile, #shutdown
Constructor Details
This class inherits a constructor from Readorder::Command
Instance Method Details
#run ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/readorder/commands/analyze.rb', line 7 def run analyzer.collect_data output.puts @analyzer.summary_report if ['data-csv'] then File.open( ['data-csv'], "w+") { |f| analyzer.dump_good_data_to( f ) } logger.info "dumped #{analyzer.good_data.size} rows to #{['data-csv']}" end end |