class BubBot::Slack::Response
Attributes
text[RW]
Public Class Methods
new(options, client)
click to toggle source
# File lib/bub_bot/slack/response.rb, line 4 def initialize(options, client) @text = options.is_a?(String) ? options : options[:text] @client = client end
Public Instance Methods
channel()
click to toggle source
# File lib/bub_bot/slack/response.rb, line 18 def channel BubBot.configuration.slack_channel end
deliver()
click to toggle source
# File lib/bub_bot/slack/response.rb, line 9 def deliver body = { text: text, username: BubBot.configuration.bot_name } # TODO: configure channel @client.chat_postMessage(channel: '#' + channel, text: text, as_user: true) end