Class: TickTock::CardLogger

Inherits:
Object
  • Object
show all
Defined in:
lib/tick_tock/card_logger.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defaultObject



14
15
16
17
18
19
20
21
22
# File 'lib/tick_tock/card_logger.rb', line 14

def self.default
  with(
    logger:         Logger.new($stdout),
    severity:       Logger::INFO,
    secs_decimals:  3,
    show_zero_mins: false,
    show_zero_hrs:  false
  )
end

Instance Method Details

#call(card) ⇒ Object



24
25
26
# File 'lib/tick_tock/card_logger.rb', line 24

def call(card)
  logger.add(severity, nil, nil) { format(card) }
end