gitlab-org--gitlab-foss/app/models/project_services/slack_service/base_message.rb

35 lines
477 B
Ruby
Raw Normal View History

require 'slack-notifier'
2015-02-20 08:49:26 -05:00
class SlackService
class BaseMessage
def initialize(params)
raise NotImplementedError
end
def pretext
format(message)
end
def fallback
end
def attachments
raise NotImplementedError
end
private
def message
raise NotImplementedError
end
def format(string)
Slack::Notifier::LinkFormatter.format(string)
end
def attachment_color
'#345'
end
end
end