Class: Gem::Checkout::RepositoryHash
- Inherits:
-
DataFinder
- Object
- DataFinder
- Gem::Checkout::RepositoryHash
- Defined in:
- lib/gem-checkout/source.rb
Constant Summary collapse
- PRIORITIES =
{ recommended: %i(source_reference), sufficient: %i(commit revision), }
Instance Attribute Summary collapse
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(reference) ⇒ RepositoryHash
constructor
A new instance of RepositoryHash.
Constructor Details
#initialize(reference) ⇒ RepositoryHash
Returns a new instance of RepositoryHash.
84 85 86 87 88 |
# File 'lib/gem-checkout/source.rb', line 84 def initialize(reference) fail Error::NoMatch unless (reference && !reference.empty?) @reference = reference Gem::Checkout.logger.debug "Found gem's commit info: #{reference}" end |
Instance Attribute Details
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
82 83 84 |
# File 'lib/gem-checkout/source.rb', line 82 def reference @reference end |
Class Method Details
.detect(object) ⇒ Object
78 79 80 |
# File 'lib/gem-checkout/source.rb', line 78 def self.detect(object) DataFinder.detect(self, object, PRIORITIES) end |