Class: IRCUser

Inherits:
Object
  • Object
show all
Defined in:
lib/IRCUser.rb

Overview

Represents IRC Users

Constant Summary collapse

@@users =
Hash.new()

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#maskObject

Returns the value of attribute mask.



16
17
18
# File 'lib/IRCUser.rb', line 16

def mask
  @mask
end

#usernameObject (readonly)

Returns the value of attribute username.



16
17
18
# File 'lib/IRCUser.rb', line 16

def username
  @username
end

Class Method Details

.create_user(username) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/IRCUser.rb', line 6

def IRCUser.create_user(username)
  username.sub!(/^[\@\%]/,'')
  
  if @@users[username]
    return @@users[username]
  end
  @@users[username] = self.new(username)
  @@users[username]
end