Class: LatestCommit

Inherits:
Object
  • Object
show all
Defined in:
lib/tipster/commands/git/latest_commit.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLatestCommit

Returns a new instance of LatestCommit.



3
4
5
# File 'lib/tipster/commands/git/latest_commit.rb', line 3

def initialize
  @id = `git rev-parse --verify HEAD`.chomp
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



2
3
4
# File 'lib/tipster/commands/git/latest_commit.rb', line 2

def id
  @id
end