Class: Svenbot::User
- Inherits:
-
Object
- Object
- Svenbot::User
- Defined in:
- lib/svenbot/user.rb
Overview
A user who wishes to receive notifications about commits.
Instance Attribute Summary collapse
-
#jid ⇒ Object
The jabber ID of the user.
-
#paths ⇒ Object
A list of paths that the user wishes to be notified about.
Instance Method Summary collapse
-
#<<(path) ⇒ Object
Add a path to the list monitored.
-
#delete(path) ⇒ Object
Remove a path from the list monitored.
-
#initialize(jid) ⇒ User
constructor
Create a new user
jid
with no paths to monitor.
Constructor Details
#initialize(jid) ⇒ User
Create a new user jid
with no paths to monitor.
10 11 12 13 |
# File 'lib/svenbot/user.rb', line 10 def initialize(jid) @jid = jid @paths = [] end |
Instance Attribute Details
#jid ⇒ Object
The jabber ID of the user.
5 6 7 |
# File 'lib/svenbot/user.rb', line 5 def jid @jid end |
#paths ⇒ Object
A list of paths that the user wishes to be notified about.
7 8 9 |
# File 'lib/svenbot/user.rb', line 7 def paths @paths end |
Instance Method Details
#<<(path) ⇒ Object
Add a path to the list monitored.
16 17 18 19 |
# File 'lib/svenbot/user.rb', line 16 def <<(path) @paths << path return self end |
#delete(path) ⇒ Object
Remove a path from the list monitored.
22 23 24 |
# File 'lib/svenbot/user.rb', line 22 def delete(path) @paths.delete path end |