Class: Rubolite::Repo
- Inherits:
-
Object
- Object
- Rubolite::Repo
- Defined in:
- lib/rubolite/repo.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
- #add_user(user) ⇒ Object
-
#initialize(name = nil) ⇒ Repo
constructor
A new instance of Repo.
Constructor Details
#initialize(name = nil) ⇒ Repo
Returns a new instance of Repo.
6 7 8 9 |
# File 'lib/rubolite/repo.rb', line 6 def initialize(name=nil) @name = name @users = [] end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rubolite/repo.rb', line 3 def name @name end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
4 5 6 |
# File 'lib/rubolite/repo.rb', line 4 def users @users end |
Instance Method Details
#add_user(user) ⇒ Object
11 12 13 |
# File 'lib/rubolite/repo.rb', line 11 def add_user(user) (@users ||= []) << user end |