Class: Relayer::IRC::Channel

Inherits:
Object
  • Object
show all
Defined in:
lib/relayer/irc/channel.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(channel) ⇒ Channel

Returns a new instance of Channel.



13
14
15
16
# File 'lib/relayer/irc/channel.rb', line 13

def initialize(channel)
  @channel = channel
  @users = []
end

Instance Attribute Details

#usersObject

Returns the value of attribute users.



3
4
5
# File 'lib/relayer/irc/channel.rb', line 3

def users
  @users
end

Class Method Details

.is_channel?(channel) ⇒ Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/relayer/irc/channel.rb', line 5

def self.is_channel?(channel)
  channel[0] == '#'
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/relayer/irc/channel.rb', line 9

def to_s
  @channel
end