Class: Cogger::Formatters::Color
- Defined in:
- lib/cogger/formatters/color.rb
Overview
Formats by color.
Direct Known Subclasses
Constant Summary collapse
- TEMPLATE =
"<dynamic>[%<id>s]</dynamic> %<message:dynamic>s"
Constants inherited from Abstract
Abstract::NEW_LINE, Abstract::SANITIZERS
Instance Method Summary collapse
- #call(*input) ⇒ Object
-
#initialize(template = TEMPLATE, parser: Parsers::Combined.new) ⇒ Color
constructor
A new instance of Color.
Constructor Details
Instance Method Details
#call(*input) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/cogger/formatters/color.rb', line 15 def call(*input) *, entry = input attributes = sanitize entry, :tagged format(parse(attributes[:level]), attributes).tap(&:strip!) << NEW_LINE end |