Class: Ant::Bot::Adapter::DebugMessage

Inherits:
Message
  • Object
show all
Defined in:
lib/ant/bot/adapters/debug.rb

Overview

:nodoc: # Wraps a debugging message inside a class.

Instance Method Summary collapse

Methods inherited from Message

#command?, #to_h

Constructor Details

#initialize(text, channel) ⇒ DebugMessage

It receives a string with the raw text and the id of the channel



11
12
13
14
# File 'lib/ant/bot/adapters/debug.rb', line 11

def initialize(text, channel)
  @text = text
  @channel = channel
end

Instance Method Details

#channel_idObject

Returns the channel id



17
18
19
# File 'lib/ant/bot/adapters/debug.rb', line 17

def channel_id
  "debug_message__#{@channel}"
end

#raw_messageObject

Returns the message contents



22
23
24
# File 'lib/ant/bot/adapters/debug.rb', line 22

def raw_message
  @text
end