Class: Slack::Notifier::PayloadMiddleware::FormatAttachments
- Defined in:
- lib/slack-notifier/payload_middleware/format_attachments.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
default_opts, #initialize, middleware_name, options
Constructor Details
This class inherits a constructor from Slack::Notifier::PayloadMiddleware::Base
Instance Method Details
#call(payload = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/slack-notifier/payload_middleware/format_attachments.rb', line 10 def call payload={} = payload.fetch(:attachments, payload["attachments"]) wrap_array().each do || ["text", :text].each do |key| if .key?(key) [key] = Util::LinkFormatter.format([key], ) end end end payload end |