Class: DockerDistribution::CanonicalReference
- Inherits:
-
Object
- Object
- DockerDistribution::CanonicalReference
- Extended by:
- Forwardable
- Defined in:
- lib/docker_distribution/canonical_reference.rb
Instance Attribute Summary collapse
-
#digest ⇒ Object
Returns the value of attribute digest.
-
#repository ⇒ Object
Returns the value of attribute repository.
Instance Method Summary collapse
- #familiar ⇒ Object
-
#initialize(repository, digest) ⇒ CanonicalReference
constructor
A new instance of CanonicalReference.
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(repository, digest) ⇒ CanonicalReference
Returns a new instance of CanonicalReference.
10 11 12 13 |
# File 'lib/docker_distribution/canonical_reference.rb', line 10 def initialize(repository, digest) @repository = repository @digest = digest end |
Instance Attribute Details
#digest ⇒ Object
Returns the value of attribute digest.
8 9 10 |
# File 'lib/docker_distribution/canonical_reference.rb', line 8 def digest @digest end |
#repository ⇒ Object
Returns the value of attribute repository.
8 9 10 |
# File 'lib/docker_distribution/canonical_reference.rb', line 8 def repository @repository end |
Instance Method Details
#familiar ⇒ Object
28 29 30 |
# File 'lib/docker_distribution/canonical_reference.rb', line 28 def familiar self.class.new(Normalize.familiarize_name(self), digest) end |
#to_h ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/docker_distribution/canonical_reference.rb', line 19 def to_h { repository: name, domain: domain, path: path, digest: digest } end |
#to_s ⇒ Object
15 16 17 |
# File 'lib/docker_distribution/canonical_reference.rb', line 15 def to_s [repository.name, digest].join("@") end |