Class: Jiragit::Git::Branch

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commitObject

Returns the value of attribute commit.



7
8
9
# File 'lib/jiragit/git/branch.rb', line 7

def commit
  @commit
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/jiragit/git/branch.rb', line 7

def name
  @name
end

Instance Method Details

#committerObject



17
18
19
# File 'lib/jiragit/git/branch.rb', line 17

def committer
  @committer ||= Jiragit::Git.committer(commit)
end

#dateObject



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

def date
  @date ||= Jiragit::Git.timestamp(commit)
end

#short_commitObject



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

def short_commit
  commit[0,6]
end

#short_nameObject



9
10
11
# File 'lib/jiragit/git/branch.rb', line 9

def short_name
  @name.gsub(/refs\/heads\//,'')
end