Class: Lita::Adapters::Slack::ChatService

Inherits:
Object
  • Object
show all
Defined in:
lib/lita/adapters/slack/chat_service.rb

Overview

Slack-specific features made available to Lita::Robot.

Since:

  • 1.6.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ChatService

Returns a new instance of ChatService.

Since:

  • 1.6.0


13
14
15
# File 'lib/lita/adapters/slack/chat_service.rb', line 13

def initialize(config)
  self.api = API.new(config)
end

Instance Attribute Details

#apiObject

Since:

  • 1.6.0


10
11
12
# File 'lib/lita/adapters/slack/chat_service.rb', line 10

def api
  @api
end

Instance Method Details

#send_attachments(target, attachments) ⇒ void Also known as: send_attachment

This method returns an undefined value.

Since:

  • 1.6.0


22
23
24
# File 'lib/lita/adapters/slack/chat_service.rb', line 22

def send_attachments(target, attachments)
  api.send_attachments(target, Array(attachments))
end