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