Class: Irc::ChannelList
Overview
A ChannelList is an ArrayOf Channel
s
Instance Attribute Summary
Attributes inherited from ArrayOf
Instance Method Summary collapse
-
#initialize(ar = []) ⇒ ChannelList
constructor
Create a new ChannelList, optionally filling it with the elements from the Array argument fed to it.
-
#names ⇒ Object
Convenience method: convert the ChannelList to a list of channel names.
Methods inherited from ArrayOf
#&, #+, #-, #<<, #concat, #downcase, #insert, #inspect, #push, #replace, #unshift, #valid?, #validate, #will_accept?, #|
Methods inherited from Array
#delete_one, #pick_one, #shuffle, #shuffle!
Constructor Details
#initialize(ar = []) ⇒ ChannelList
Create a new ChannelList, optionally filling it with the elements from the Array argument fed to it.
1492 1493 1494 |
# File 'lib/rbot/irc.rb', line 1492 def initialize(ar=[]) super(Channel, ar) end |
Instance Method Details
#names ⇒ Object
Convenience method: convert the ChannelList to a list of channel names. The indices are preserved
1499 1500 1501 |
# File 'lib/rbot/irc.rb', line 1499 def names self.map { |chan| chan.name } end |