Class: Irc::Channel::ModeTypeA
Overview
Channel modes of type A manipulate lists
Example: b (banlist)
Instance Attribute Summary (collapse)
-
- (Object) list
readonly
Returns the value of attribute list.
Attributes inherited from Mode
Instance Method Summary (collapse)
-
- (ModeTypeA) initialize(ch)
constructor
A new instance of ModeTypeA.
- - (Object) reset(val)
- - (Object) set(val)
Constructor Details
- (ModeTypeA) initialize(ch)
Returns a new instance of ModeTypeA
1154 1155 1156 1157 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/irc.rb', line 1154 def initialize(ch) super @list = NetmaskList.new end |
Instance Attribute Details
- (Object) list (readonly)
Returns the value of attribute list
1153 1154 1155 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/irc.rb', line 1153 def list @list end |
Instance Method Details
- (Object) reset(val)
1164 1165 1166 1167 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/irc.rb', line 1164 def reset(val) nm = @channel.server.new_netmask(val) @list.delete(nm) end |
- (Object) set(val)
1159 1160 1161 1162 |
# File '/home/apoc/projects/ruby/rbot/lib/rbot/irc.rb', line 1159 def set(val) nm = @channel.server.new_netmask(val) @list << nm unless @list.include?(nm) end |