Class: Pronto::Formatter::TextFormatter

Inherits:
Base
  • Object
show all
Defined in:
lib/pronto/formatter/text_formatter.rb

Instance Method Summary collapse

Methods inherited from Base

#config, name

Instance Method Details

#format(messages, _, _) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/pronto/formatter/text_formatter.rb', line 6

def format(messages, _, _)
  messages.map do |message|
    message_format = config.message_format(self.class.name)
    message_data = TextMessageDecorator.new(message).to_h
    (message_format % message_data).strip
  end
end