Parent

Included Modules

Files

Git::Branches

object that holds all the available branches

Public Class Methods

new(base) click to toggle source
    # File lib/git/branches.rb, line 7
 7:     def initialize(base)
 8:       @branches = {}
 9:       
10:       @base = base
11:             
12:       @base.lib.branches_all.each do |b|
13:         @branches[b[0]] = Git::Branch.new(@base, b[0])
14:       end
15:     end

Public Instance Methods

[](symbol) click to toggle source
    # File lib/git/branches.rb, line 35
35:     def [](symbol)
36:       @branches[symbol.to_s]
37:     end
each(&block) click to toggle source
    # File lib/git/branches.rb, line 31
31:     def each(&block)
32:       @branches.values.each(&block)
33:     end
local() click to toggle source
    # File lib/git/branches.rb, line 17
17:     def local
18:       self.select { |b| !b.remote }
19:     end
remote() click to toggle source
    # File lib/git/branches.rb, line 21
21:     def remote
22:       self.select { |b| b.remote }
23:     end
size() click to toggle source

array like methods

    # File lib/git/branches.rb, line 27
27:     def size
28:       @branches.size
29:     end
to_s() click to toggle source
    # File lib/git/branches.rb, line 39
39:     def to_s
40:       out = ''
41:       @branches.each do |k, b|
42:         out << (b.current ? '* ' : '  ') << b.to_s << "\n"
43:       end
44:       out
45:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.