Class: Irc::Channel::ModeTypeA
Overview
Channel modes of type A manipulate lists
Example: b (banlist)
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Attributes inherited from Mode
Instance Method Summary collapse
-
#initialize(ch) ⇒ ModeTypeA
constructor
A new instance of ModeTypeA.
- #reset(val) ⇒ Object
- #set(val) ⇒ Object
Constructor Details
#initialize(ch) ⇒ ModeTypeA
Returns a new instance of ModeTypeA.
1121 1122 1123 1124 |
# File 'lib/rbot/irc.rb', line 1121 def initialize(ch) super @list = NetmaskList.new end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
1120 1121 1122 |
# File 'lib/rbot/irc.rb', line 1120 def list @list end |
Instance Method Details
#reset(val) ⇒ Object
1131 1132 1133 1134 |
# File 'lib/rbot/irc.rb', line 1131 def reset(val) nm = @channel.server.new_netmask(val) @list.delete(nm) end |
#set(val) ⇒ Object
1126 1127 1128 1129 |
# File 'lib/rbot/irc.rb', line 1126 def set(val) nm = @channel.server.new_netmask(val) @list << nm unless @list.include?(nm) end |