Class: R10K::Git::Commit Private

Inherits:
Ref
  • Object
show all
Defined in:
lib/r10k/git/commit.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

commit: A 40-byte hex representation of a SHA1 referencing a specific commit

Instance Attribute Summary collapse

Attributes inherited from Ref

#repository

Instance Method Summary collapse

Methods inherited from Ref

#==, #inspect, #resolvable?, #sha1, #to_s

Constructor Details

#initialize(commit, repository = nil) ⇒ Commit

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Commit.



14
15
16
17
# File 'lib/r10k/git/commit.rb', line 14

def initialize(commit, repository = nil)
  @commit = commit
  @repository = repository
end

Instance Attribute Details

#commitObject (readonly) Also known as: ref

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
# File 'lib/r10k/git/commit.rb', line 11

def commit
  @commit
end

Instance Method Details

#fetch?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Boolean)


19
20
21
# File 'lib/r10k/git/commit.rb', line 19

def fetch?
  ! resolvable?
end