lib/k8s/kubeconfig/root.rb
# Remove everything but the values relevant for current context
# @return [Root] self after modification
# @raise [RuntimeError] if current_context is unset
Remove everything but the values relevant for current context
Remove everything but the values relevant for current context
def minify!
        raise 'current_context is nil' if current_context.nil?
        contexts.replace([named_context])
        clusters.replace([named_cluster])
        users.replace([named_user])
        self
      end
def minify! raise 'current_context is nil' if current_context . nil? contexts . replace ( [ named_context ] ) clusters . replace ( [ named_cluster ] ) users . replace ( [ named_user ] ) self end
Remove everything but the values relevant for current context
Remove everything but the values relevant for current context
self after modification
self after modification
Root
[RuntimeError] if current_context is unset
[ RuntimeError ] if current_context is unset