Class: DockerDistribution::Repository
- Inherits:
-
Object
- Object
- DockerDistribution::Repository
- Defined in:
- lib/docker_distribution/repository.rb
Instance Attribute Summary collapse
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
- #familiar ⇒ Object
-
#initialize(domain = nil, path = nil) ⇒ Repository
constructor
A new instance of Repository.
- #name ⇒ Object
- #to_h ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(domain = nil, path = nil) ⇒ Repository
Returns a new instance of Repository.
7 8 9 10 |
# File 'lib/docker_distribution/repository.rb', line 7 def initialize(domain = nil, path = nil) @domain = domain @path = path end |
Instance Attribute Details
#domain ⇒ Object
Returns the value of attribute domain.
5 6 7 |
# File 'lib/docker_distribution/repository.rb', line 5 def domain @domain end |
#path ⇒ Object
Returns the value of attribute path.
5 6 7 |
# File 'lib/docker_distribution/repository.rb', line 5 def path @path end |
Instance Method Details
#familiar ⇒ Object
30 31 32 |
# File 'lib/docker_distribution/repository.rb', line 30 def familiar Normalize.familiarize_name(self) end |
#name ⇒ Object
12 13 14 15 16 |
# File 'lib/docker_distribution/repository.rb', line 12 def name return path if Helpers.empty?(domain) [domain, path].join("/") end |
#to_h ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/docker_distribution/repository.rb', line 22 def to_h { repository: name, domain: domain, path: path } end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/docker_distribution/repository.rb', line 18 def to_s name end |