Class: IRCSupport::Message::DCC

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

Direct Known Subclasses

Accept, Chat, Send

Defined Under Namespace

Classes: Accept, Chat, Resume, Send

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

Returns a new instance of DCC.



196
197
198
199
200
201
202
# File 'lib/ircsupport/message.rb', line 196

def initialize(args)
  super(args)
  @sender = args[:prefix]
  @dcc_args = args[:args][1]
  @dcc_type = args[:dcc_type].downcase.to_sym
  @type = "dcc_#@dcc_type".to_sym
end

Instance Attribute Details

#dcc_argsString

Returns The argument string to the DCC message.

Returns:

  • (String)

    The argument string to the DCC message.



193
194
195
# File 'lib/ircsupport/message.rb', line 193

def dcc_args
  @dcc_args
end

#dcc_typeSymbol

Returns The type of the DCC message.

Returns:

  • (Symbol)

    The type of the DCC message.



190
191
192
# File 'lib/ircsupport/message.rb', line 190

def dcc_type
  @dcc_type
end

#senderString

Returns The sender of the DCC message.

Returns:

  • (String)

    The sender of the DCC message.



187
188
189
# File 'lib/ircsupport/message.rb', line 187

def sender
  @sender
end