Class: Irc::Channel::ModeTypeC

Inherits:
Mode show all
Defined in:
lib/rbot/irc.rb

Overview

Channel modes of type C need an argument when set, but not when they get reset

Example: l (limit)

Instance Attribute Summary

Attributes inherited from Mode

#channel

Instance Method Summary collapse

Constructor Details

#initialize(ch) ⇒ ModeTypeC

Returns a new instance of ModeTypeC.



1230
1231
1232
1233
# File 'lib/rbot/irc.rb', line 1230

def initialize(ch)
  super
  @arg = nil
end

Instance Method Details

#resetObject



1244
1245
1246
# File 'lib/rbot/irc.rb', line 1244

def reset
  @arg = nil
end

#set(val) ⇒ Object



1240
1241
1242
# File 'lib/rbot/irc.rb', line 1240

def set(val)
  @arg = val
end

#statusObject Also known as: value



1235
1236
1237
# File 'lib/rbot/irc.rb', line 1235

def status
  @arg
end