Class: IRCSupport::Message::Part

Inherits:
IRCSupport::Message show all
Defined in:
lib/ircsupport/message.rb

Instance Attribute Summary collapse

Attributes inherited from IRCSupport::Message

#args, #command, #prefix

Instance Method Summary collapse

Methods inherited from IRCSupport::Message

#type

Constructor Details

#initialize(args) ⇒ Part

Returns a new instance of Part.



333
334
335
336
337
338
339
# File 'lib/ircsupport/message.rb', line 333

def initialize(args)
  super(args)
  @parter = args[:prefix]
  @channel = args[:args][0]
  @message = args[:args][1]
  @message = nil if @message && @message.empty?
end

Instance Attribute Details

#channelString

Returns The name of the channel being parted.

Returns:

  • (String)

    The name of the channel being parted.



327
328
329
# File 'lib/ircsupport/message.rb', line 327

def channel
  @channel
end

#messageString

Returns The part message, if any.

Returns:

  • (String)

    The part message, if any.



330
331
332
# File 'lib/ircsupport/message.rb', line 330

def message
  @message
end

#parterString

Returns The user who is parting.

Returns:

  • (String)

    The user who is parting.



324
325
326
# File 'lib/ircsupport/message.rb', line 324

def parter
  @parter
end