Class: IRCUser
- Inherits:
-
Object
- Object
- IRCUser
- Defined in:
- lib/IRCUser.rb
Overview
Represents IRC Users
Constant Summary collapse
- @@users =
Hash.new()
Instance Attribute Summary collapse
-
#mask ⇒ Object
Returns the value of attribute mask.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Class Method Summary collapse
Instance Attribute Details
#mask ⇒ Object
Returns the value of attribute mask.
16 17 18 |
# File 'lib/IRCUser.rb', line 16 def mask @mask end |
#username ⇒ Object (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 |