Class: Kube::Station::Config

Inherits:
ApplicationRecord show all
Defined in:
app/models/kube/station/config.rb

Instance Method Summary collapse

Instance Method Details

#with_kubeconfig_fileObject



6
7
8
9
10
11
12
13
# File 'app/models/kube/station/config.rb', line 6

def with_kubeconfig_file
  file = Tempfile.new(["kubeconfig", ".yaml"])
  file.write(data)
  file.close
  yield file.path
ensure
  file&.unlink
end