Class: Dip::Commands::Kubectl

Inherits:
Dip::Command show all
Defined in:
lib/dip/commands/kubectl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Dip::Command

exec_program, exec_subprocess

Constructor Details

#initialize(*argv) ⇒ Kubectl

Returns a new instance of Kubectl.



10
11
12
13
# File 'lib/dip/commands/kubectl.rb', line 10

def initialize(*argv)
  @argv = argv
  @config = ::Dip.config.kubectl || {}
end

Instance Attribute Details

#argvObject (readonly)

Returns the value of attribute argv.



8
9
10
# File 'lib/dip/commands/kubectl.rb', line 8

def argv
  @argv
end

#configObject (readonly)

Returns the value of attribute config.



8
9
10
# File 'lib/dip/commands/kubectl.rb', line 8

def config
  @config
end

Instance Method Details

#executeObject



15
16
17
18
19
# File 'lib/dip/commands/kubectl.rb', line 15

def execute
  k_argv = cli_options + argv

  exec_program("kubectl", k_argv)
end