Class: Eternity::Branch

Inherits:
Object
  • Object
show all
Defined in:
lib/eternity/branch.rb

Class Method Summary collapse

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

Returns:

  • (Boolean)


13
14
15
# File 'lib/eternity/branch.rb', line 13

def exists?(name)
  branches.key? name
end

.namesObject



21
22
23
# File 'lib/eternity/branch.rb', line 21

def names
  branches.keys
end