debian-mirror-gitlab/app/models/project_services/slack_service/base_message.rb

35 lines
477 B
Ruby
Raw Normal View History

2015-04-26 12:48:37 +05:30
require 'slack-notifier'
class SlackService
class BaseMessage
def initialize(params)
raise NotImplementedError
end
def pretext
format(message)
end
2015-12-23 02:04:40 +05:30
def fallback
end
2015-04-26 12:48:37 +05:30
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