Class: IRCSupport::Message::Topic

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) ⇒ Topic

Returns a new instance of Topic.



428
429
430
431
432
433
434
# File 'lib/ircsupport/message.rb', line 428

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

Instance Attribute Details

#changerString

Returns The user or server which is changing the topic.

Returns:

  • (String)

    The user or server which is changing the topic.



419
420
421
# File 'lib/ircsupport/message.rb', line 419

def changer
  @changer
end

#channelString

Returns The name of the channel.

Returns:

  • (String)

    The name of the channel.



422
423
424
# File 'lib/ircsupport/message.rb', line 422

def channel
  @channel
end

#topicString

Returns The new topic.

Returns:

  • (String)

    The new topic.



425
426
427
# File 'lib/ircsupport/message.rb', line 425

def topic
  @topic
end