Class: Worklog::LogEntryFormatters::SimpleFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/log_entry_formatters.rb

Overview

Simple formatter that doesn’t add any colors or metadata to the output. This formatter should be used when the output is meant to be consumed by other tools or when the formatting is not desired.

Instance Method Summary collapse

Methods inherited from BaseFormatter

#initialize

Constructor Details

This class inherits a constructor from Worklog::LogEntryFormatters::BaseFormatter

Instance Method Details

#format(log_entry) ⇒ String

Format the log entry message without any metadata.

Parameters:

  • log_entry (LogEntry)

    the log entry to format.

Returns:

  • (String)

    the formatted message.



85
86
87
# File 'lib/log_entry_formatters.rb', line 85

def format(log_entry)
  replace_people_handles(log_entry, log_entry.message.dup)
end