Class: IRC::Server::User
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#modes ⇒ Object
readonly
Returns the value of attribute modes.
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(client, channel, modes = Modes.new) ⇒ User
constructor
A new instance of User.
- #inspect ⇒ Object
- #mask ⇒ Object
- #nick ⇒ Object
- #realName ⇒ Object
- #send(type, *args) ⇒ Object
- #server ⇒ Object
- #to_s ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(client, channel, modes = Modes.new) ⇒ User
Returns a new instance of User.
27 28 29 30 31 |
# File 'lib/failirc/server/user.rb', line 27 def initialize (client, channel, modes=Modes.new) @client = client @channel = channel @modes = modes end |
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
25 26 27 |
# File 'lib/failirc/server/user.rb', line 25 def channel @channel end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
25 26 27 |
# File 'lib/failirc/server/user.rb', line 25 def client @client end |
#modes ⇒ Object (readonly)
Returns the value of attribute modes.
25 26 27 |
# File 'lib/failirc/server/user.rb', line 25 def modes @modes end |
Instance Method Details
#host ⇒ Object
49 50 51 |
# File 'lib/failirc/server/user.rb', line 49 def host @client.host end |
#inspect ⇒ Object
65 66 67 |
# File 'lib/failirc/server/user.rb', line 65 def inspect return "#<User: #{client.inspect} #{channel.inspect} #{modes.inspect}>" end |
#mask ⇒ Object
33 34 35 |
# File 'lib/failirc/server/user.rb', line 33 def mask @client.mask end |
#nick ⇒ Object
41 42 43 |
# File 'lib/failirc/server/user.rb', line 41 def nick @client.nick end |
#realName ⇒ Object
53 54 55 |
# File 'lib/failirc/server/user.rb', line 53 def realName @client.realName end |
#send(type, *args) ⇒ Object
57 58 59 |
# File 'lib/failirc/server/user.rb', line 57 def send (type, *args) @client.send(type, *args) end |
#server ⇒ Object
37 38 39 |
# File 'lib/failirc/server/user.rb', line 37 def server @client.server end |
#to_s ⇒ Object
61 62 63 |
# File 'lib/failirc/server/user.rb', line 61 def to_s return "#{modes[:level]}#{nick}" end |
#user ⇒ Object
45 46 47 |
# File 'lib/failirc/server/user.rb', line 45 def user @client.user end |