Class: Ghaki::Stats::Format::Output
- Defined in:
- lib/ghaki/stats/format/output.rb
Overview
Default formatting for generating Statistics Reports using an output file object.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#dump_body(stats, log, title) ⇒ Object
Dumps body of stats.
Methods inherited from Base
#dump, #dump_head, #dump_tail, #initialize
Constructor Details
This class inherits a constructor from Ghaki::Stats::Format::Base
Instance Method Details
#dump_body(stats, log, title) ⇒ Object
Dumps body of stats.
13 14 15 16 17 18 19 20 21 |
# File 'lib/ghaki/stats/format/output.rb', line 13 def dump_body stats, log, title stats.keys.sort.each do |major| log.puts major + ':' stats[major].keys.sort.each do |minor| count = stats[major][minor] log.puts ' ' + count.to_s.rjust(8) + ' : ' + minor end end end |