Class: IRC::Client::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
- #server ⇒ Object
- #to_s ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(client, channel, modes = Modes.new) ⇒ User
Returns a new instance of User.
29 30 31 32 33 |
# File 'lib/failirc/client/user.rb', line 29 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.
27 28 29 |
# File 'lib/failirc/client/user.rb', line 27 def channel @channel end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
27 28 29 |
# File 'lib/failirc/client/user.rb', line 27 def client @client end |
#modes ⇒ Object (readonly)
Returns the value of attribute modes.
27 28 29 |
# File 'lib/failirc/client/user.rb', line 27 def modes @modes end |
Instance Method Details
#host ⇒ Object
51 52 53 |
# File 'lib/failirc/client/user.rb', line 51 def host @client.host end |
#inspect ⇒ Object
59 60 61 |
# File 'lib/failirc/client/user.rb', line 59 def inspect return "#<User: #{client.inspect} #{channel.inspect} #{modes.inspect}>" end |
#mask ⇒ Object
35 36 37 |
# File 'lib/failirc/client/user.rb', line 35 def mask @client.mask end |
#nick ⇒ Object
43 44 45 |
# File 'lib/failirc/client/user.rb', line 43 def nick @client.nick end |
#server ⇒ Object
39 40 41 |
# File 'lib/failirc/client/user.rb', line 39 def server @client.server end |
#to_s ⇒ Object
55 56 57 |
# File 'lib/failirc/client/user.rb', line 55 def to_s return "#{modes[:level]}#{nick}" end |
#user ⇒ Object
47 48 49 |
# File 'lib/failirc/client/user.rb', line 47 def user @client.user end |