Module: Waylon::Message Abstract

Included in:
RSpec::TestMessage
Defined in:
lib/waylon/message.rb

Overview

This module is abstract.

Abstract Message module

Instance Method Summary collapse

Instance Method Details

#authorObject

Message author (meant to be overwritten by mixing classes)



8
9
10
# File 'lib/waylon/message.rb', line 8

def author
  nil
end

#bodyObject

Message body



13
14
15
# File 'lib/waylon/message.rb', line 13

def body
  nil
end

#channelObject

Message channel (meant to be overwritten by mixing classes)



18
19
20
# File 'lib/waylon/message.rb', line 18

def channel
  nil
end

#mentions_bot?Boolean

Does the Message mention the bot (meant to be overwritten by mixing classes)

Returns:

  • (Boolean)


23
24
25
# File 'lib/waylon/message.rb', line 23

def mentions_bot?
  false
end

#private?Boolean

Is the Message a private/direct Message?

Returns:

  • (Boolean)


28
29
30
# File 'lib/waylon/message.rb', line 28

def private?
  false
end

#to_bot?Boolean

Returns:

  • (Boolean)


32
33
34
35
# File 'lib/waylon/message.rb', line 32

def to_bot?
  # private? || mentions_bot?
  true
end