Class: Cogger::Formatters::Property
- Defined in:
- lib/cogger/formatters/property.rb
Overview
Formats as key=value output.
Constant Summary collapse
- TEMPLATE =
nil
Constants inherited from Abstract
Abstract::NEW_LINE, Abstract::SANITIZERS
Instance Method Summary collapse
- #call(*input) ⇒ Object
-
#initialize(template = TEMPLATE, parser: Parsers::Position.new) ⇒ Property
constructor
A new instance of Property.
Constructor Details
Instance Method Details
#call(*input) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/cogger/formatters/property.rb', line 17 def call(*input) *, entry = input attributes = sanitize(entry, :tagged_attributes).tap(&:compact!) concat(attributes).chop! << NEW_LINE end |