Class: Changelog::Notifier::Formatters::Slack

Inherits:
Object
  • Object
show all
Defined in:
lib/changelog/notifier/formatters/slack.rb

Overview

Format the given release note hash for Slack

Instance Method Summary collapse

Constructor Details

#initialize(release_note_hash) ⇒ Slack

Returns a new instance of Slack.



13
14
15
# File 'lib/changelog/notifier/formatters/slack.rb', line 13

def initialize(release_note_hash)
  @release_note_hash = release_note_hash
end

Instance Method Details

#formatObject



17
18
19
20
21
22
# File 'lib/changelog/notifier/formatters/slack.rb', line 17

def format
  {
    attachments: build_attachments,
    text: description_text
  }
end