Class: ModSpox::Messages::Outgoing::Privmsg

Inherits:
Object
  • Object
show all
Defined in:
lib/mod_spox/messages/outgoing/Privmsg.rb

Direct Known Subclasses

Notice

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, message, action = false) ⇒ Privmsg

target

target for the message

message

message to be sent

Send a message to user or channel



14
15
16
17
18
# File 'lib/mod_spox/messages/outgoing/Privmsg.rb', line 14

def initialize(target, message, action=false)
    @target = target
    @message = message
    @action = action
end

Instance Attribute Details

#actionObject (readonly)

message is an action



10
11
12
# File 'lib/mod_spox/messages/outgoing/Privmsg.rb', line 10

def action
  @action
end

#messageObject (readonly)

the message



8
9
10
# File 'lib/mod_spox/messages/outgoing/Privmsg.rb', line 8

def message
  @message
end

#targetObject (readonly)

target for the message



6
7
8
# File 'lib/mod_spox/messages/outgoing/Privmsg.rb', line 6

def target
  @target
end

Instance Method Details

#is_action?Boolean

is message an action

Returns:

  • (Boolean)


21
22
23
# File 'lib/mod_spox/messages/outgoing/Privmsg.rb', line 21

def is_action?
    return action
end