Class: R10K::Git::Commit Private
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
- #commit ⇒ Object (also: #ref) readonly private
Attributes inherited from Ref
Instance Method Summary collapse
- #fetch? ⇒ Boolean private
-
#initialize(commit, repository = nil) ⇒ Commit
constructor
private
A new instance of Commit.
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
#commit ⇒ Object (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.
19 20 21 |
# File 'lib/r10k/git/commit.rb', line 19 def fetch? ! resolvable? end |