Class: Weechat::IRC::User
Instance Attribute Summary collapse
-
#channel ⇒ Object
readonly
Returns the value of attribute channel.
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #ban ⇒ Object
- #dehalfop ⇒ Object
- #deop ⇒ Object
- #devoice ⇒ Object
- #halfop ⇒ Object
-
#initialize(args = {}) ⇒ User
constructor
A new instance of User.
- #kick(reason = "") ⇒ Object
- #kickban(reason = "") ⇒ Object
- #op ⇒ Object
- #unban ⇒ Object
- #voice ⇒ Object
Constructor Details
Instance Attribute Details
#channel ⇒ Object (readonly)
Returns the value of attribute channel.
8 9 10 |
# File 'lib/weechat/user.rb', line 8 def channel @channel end |
#color ⇒ Object (readonly)
Returns the value of attribute color.
7 8 9 |
# File 'lib/weechat/user.rb', line 7 def color @color end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
6 7 8 |
# File 'lib/weechat/user.rb', line 6 def flags @flags end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
5 6 7 |
# File 'lib/weechat/user.rb', line 5 def host @host end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/weechat/user.rb', line 4 def name @name end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
22 23 24 |
# File 'lib/weechat/user.rb', line 22 def ==(other) @name == other.name && @host == other.host && @channel == other.channel end |
#ban ⇒ Object
56 57 58 |
# File 'lib/weechat/user.rb', line 56 def ban @channel.exec("/ban #@name") end |
#dehalfop ⇒ Object
44 45 46 |
# File 'lib/weechat/user.rb', line 44 def dehalfop @channel.exec("/dehalfop #@name") end |
#deop ⇒ Object
40 41 42 |
# File 'lib/weechat/user.rb', line 40 def deop @channel.exec("/deop #@name") end |
#devoice ⇒ Object
48 49 50 |
# File 'lib/weechat/user.rb', line 48 def devoice @channel.exec("/devoice #@name") end |
#halfop ⇒ Object
32 33 34 |
# File 'lib/weechat/user.rb', line 32 def halfop @channel.exec("/halfop #@name") end |
#kick(reason = "") ⇒ Object
52 53 54 |
# File 'lib/weechat/user.rb', line 52 def kick(reason="") @channel.exec("/kick #@name #{reason}") end |
#kickban(reason = "") ⇒ Object
64 65 66 67 |
# File 'lib/weechat/user.rb', line 64 def kickban(reason="") kick(reason) ban end |
#op ⇒ Object
28 29 30 |
# File 'lib/weechat/user.rb', line 28 def op @channel.exec("/op #@name") end |
#unban ⇒ Object
60 61 62 |
# File 'lib/weechat/user.rb', line 60 def unban @channel.exec("/unban #@name") end |
#voice ⇒ Object
36 37 38 |
# File 'lib/weechat/user.rb', line 36 def voice @channel.exec("/voice #@name") end |