lib/slack/poster.rb
# Sends a message to Slack. The message can be either plain text or a Slack::Message object.
#
# ==== Examples
#
#   # Plain text message
#   poster.send_message('hello world')
#
#   # Using a message object
#   poster.send_message(Slack::Message.new(text: 'hello world'))
#
# You can have messages with attachments if you build your message with a Slack::Message object
# and add Slack::Attachment objects.
Sends a message to Slack. The message can be either plain text or a Slack::Message object.
Examples

Plain text message
poster.send_message('hello world')



You can have messages with attachments if you build your message with a Slack::Message object
and add Slack::Attachment objects.
Sends a message to Slack . The message can be either plain text or a Slack :: Message object . Examples Plain text message poster . send_message ( ' hello world ' ) You can have messages with attachments if you build your message with a Slack :: Message object and add Slack :: Attachment objects .
def send_message(message)
      body = message.is_a?(String) ? options.merge(text: message) : options.merge(message.as_json)
      conn = Faraday.new(url: @base_uri)
      response = conn.post('', payload: body.to_json)
      response
    end
def send_message ( message ) body = message . is_a? ( String ) ? options . merge ( text : message ) : options . merge ( message . as_json ) conn = Faraday . new ( url : @base_uri ) response = conn . post ( '' , payload : body . to_json ) response end
Sends a message to Slack.
Sends a message to Slack .
message