Class: Kubes::CLI::Delete

Inherits:
Base
  • Object
show all
Includes:
Util::Sure
Defined in:
lib/kubes/cli/delete.rb

Instance Method Summary collapse

Methods included from Util::Sure

#sure?

Methods inherited from Base

#compile, #initialize, #pod_name

Methods included from Logging

#logger

Constructor Details

This class inherits a constructor from Kubes::CLI::Base

Instance Method Details

#perform(preview: false) ⇒ Object



12
13
14
# File 'lib/kubes/cli/delete.rb', line 12

def perform(preview: false)
  Kubes::Kubectl::Dispatcher.new(:delete, @options.merge(preview: preview)).run
end

#runObject



5
6
7
8
9
10
# File 'lib/kubes/cli/delete.rb', line 5

def run
  compile
  perform(preview: true) unless @options[:yes]
  sure?("This will delete resources. Are you sure?")
  perform(preview: false)
end