Class: LatestCommit
- Inherits:
-
Object
- Object
- LatestCommit
- Defined in:
- lib/tipster/commands/git/latest_commit.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize ⇒ LatestCommit
constructor
A new instance of LatestCommit.
Constructor Details
#initialize ⇒ LatestCommit
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
#id ⇒ Object (readonly)
Returns the value of attribute id.
2 3 4 |
# File 'lib/tipster/commands/git/latest_commit.rb', line 2 def id @id end |