Class: Eternity::Branch
- Inherits:
-
Object
- Object
- Eternity::Branch
- Defined in:
- lib/eternity/branch.rb
Class Method Summary collapse
- .[](name) ⇒ Object
- .[]=(name, commit_id) ⇒ Object
- .delete(name) ⇒ Object
- .exists?(name) ⇒ Boolean
- .names ⇒ Object
Class Method Details
.[](name) ⇒ Object
5 6 7 |
# File 'lib/eternity/branch.rb', line 5 def [](name) Commit.new branches[name] end |
.[]=(name, commit_id) ⇒ Object
9 10 11 |
# File 'lib/eternity/branch.rb', line 9 def []=(name, commit_id) branches[name] = commit_id end |
.delete(name) ⇒ Object
17 18 19 |
# File 'lib/eternity/branch.rb', line 17 def delete(name) branches.delete name end |
.exists?(name) ⇒ Boolean
13 14 15 |
# File 'lib/eternity/branch.rb', line 13 def exists?(name) branches.key? name end |
.names ⇒ Object
21 22 23 |
# File 'lib/eternity/branch.rb', line 21 def names branches.keys end |