Class: KuberKit::Core::Registries::Registry

Inherits:
AbstractRegistry show all
Defined in:
lib/kuber_kit/core/registries/registry.rb

Instance Attribute Summary

Attributes inherited from AbstractRegistry

#name

Instance Method Summary collapse

Methods inherited from AbstractRegistry

#initialize

Methods included from Extensions::Inspectable

#inspect

Constructor Details

This class inherits a constructor from KuberKit::Core::Registries::AbstractRegistry

Instance Method Details

#local?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/kuber_kit/core/registries/registry.rb', line 21

def local?
  @remote_url.nil?
end

#pathObject



9
10
11
# File 'lib/kuber_kit/core/registries/registry.rb', line 9

def path
  name.to_s
end

#remote?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/kuber_kit/core/registries/registry.rb', line 17

def remote?
  !local?
end

#remote_pathObject



13
14
15
# File 'lib/kuber_kit/core/registries/registry.rb', line 13

def remote_path
  [@remote_url, path].compact.join("/")
end

#set_remote_url(remote_url) ⇒ Object Also known as: setup



2
3
4
5
6
# File 'lib/kuber_kit/core/registries/registry.rb', line 2

def set_remote_url(remote_url)
  @remote_url = remote_url
  
  self
end