Class: Cogger::Formatters::Simple
- Defined in:
- lib/cogger/formatters/simple.rb
Overview
Formats simple templates that require minimal processing.
Constant Summary collapse
- TEMPLATE =
"[%<id>s] %<message>s"
Constants inherited from Abstract
Abstract::NEW_LINE, Abstract::SANITIZERS
Instance Method Summary collapse
- #call(*input) ⇒ Object
-
#initialize(template = TEMPLATE) ⇒ Simple
constructor
A new instance of Simple.
Constructor Details
Instance Method Details
#call(*input) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/cogger/formatters/simple.rb', line 14 def call(*input) *, entry = input attributes = sanitize entry, :tagged format(template, attributes).tap(&:strip!) << NEW_LINE end |