Class: Ghaki::Stats::Format::Logger

Inherits:
Output show all
Defined in:
lib/ghaki/stats/format/logger.rb

Overview

Default formatting for generating Statistics Reports using a Logger object.

Instance Attribute Summary

Attributes inherited from Base

#title

Instance Method Summary collapse

Methods inherited from Output

#dump_body

Methods inherited from Base

#dump, #dump_body, #initialize

Constructor Details

This class inherits a constructor from Ghaki::Stats::Format::Base

Instance Method Details

#dump_head(stats, log, title) ⇒ Object

Dump heading info, which in this case is a minor began log.



14
15
16
17
18
19
20
# File 'lib/ghaki/stats/format/logger.rb', line 14

def dump_head stats, log, title
  if title.empty?
    log.minor.began 'dumping statistics'
  else
    log.box title
  end
end

#dump_tail(stats, log, title) ⇒ Object

Dump footer info, which in this case is a minor ended log.



24
25
26
27
28
29
30
# File 'lib/ghaki/stats/format/logger.rb', line 24

def dump_tail stats, log, title
  if title.empty?
    log.minor.ended 'dumping statistics'
  else
    log.liner
  end
end