Class: Papa::Command::Slack::SendMessage

Inherits:
Base
  • Object
show all
Defined in:
lib/papa/command/slack/send_message.rb

Instance Attribute Summary

Attributes inherited from Base

#command, #exit_status, #silent, #stderr, #stdout

Instance Method Summary collapse

Methods inherited from Base

#cleanup, #failed?, #failure_message, #run, #success?

Constructor Details

#initialize(build_type, hostname, action) ⇒ SendMessage

Returns a new instance of SendMessage.



9
10
11
12
13
14
15
16
# File 'lib/papa/command/slack/send_message.rb', line 9

def initialize(build_type, hostname, action)
  @build_type = build_type
  @hostname = hostname
  @action = action

  command = "curl -X POST --data-urlencode 'payload=#{payload.to_json}' #{webhook_url}"
  super(command)
end