Class: Slk::Formatters::AttachmentFormatter
- Inherits:
-
Object
- Object
- Slk::Formatters::AttachmentFormatter
- Defined in:
- lib/slk/formatters/attachment_formatter.rb
Overview
Formats Slack message attachments for terminal display
Instance Method Summary collapse
- #format(attachments, lines, options, message_ts: nil) ⇒ Object
-
#initialize(output:, text_processor:) ⇒ AttachmentFormatter
constructor
A new instance of AttachmentFormatter.
Constructor Details
#initialize(output:, text_processor:) ⇒ AttachmentFormatter
Returns a new instance of AttachmentFormatter.
7 8 9 10 |
# File 'lib/slk/formatters/attachment_formatter.rb', line 7 def initialize(output:, text_processor:) @output = output @text_processor = text_processor end |
Instance Method Details
#format(attachments, lines, options, message_ts: nil) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/slk/formatters/attachment_formatter.rb', line 12 def format(, lines, , message_ts: nil) return if .empty? return if [:no_attachments] .each_with_index do |att, idx| (att, lines, , message_ts: , index: idx) end end |