Class: SupportOps::Slack::Messages

Inherits:
Base
  • Object
show all
Defined in:
lib/support_ops_slack/slack/messages.rb

Overview

Defines the class Messages within the module SupportOps::Slack.

Author:

  • Jason Colyer

Since:

  • 1.0.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attributes, client, #client=, configure, define_attributes, #initialize, readonly_attributes, #store_original_attributes

Constructor Details

This class inherits a constructor from SupportOps::Slack::Base

Instance Attribute Details

#textString

The text to send

Returns:

  • (String)

    the current value of text



13
14
15
# File 'lib/support_ops_slack/slack/messages.rb', line 13

def text
  @text
end

Instance Method Details

#save!Object

Note:

This is inherited from Base#save!

Create a Message (i.e. post a message)

Examples:

require 'support_ops_slack'

SupportOps::Slack::Configuration.configure do |config|
  config.url = ENV.fetch('SLACK_URL')
end

new_message = SupportOps::Slack::Messages.new
new_message.text = 'This is a test'
new_message.save!

Author:

  • Jason Colyer

Since:

  • 1.0.0



16
# File 'lib/support_ops_slack/slack/messages.rb', line 16

def save!; end