Class: Rhelm::Subcommand::History

Inherits:
Base
  • Object
show all
Defined in:
lib/rhelm/subcommand/history.rb

Overview

Helm history subcommand: ‘helm history RELEASE_NAME [flags]`. docs: helm.sh/docs/helm/helm_history/

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #debug, #kube_apiserver, #kube_as_group, #kube_as_user, #kube_context, #kube_token, #kubeconfig, #namespace, #registry_config, #repository_cache, #repository_config

Instance Method Summary collapse

Methods inherited from Base

#args, #full_cli_call, #report_failure, #run

Constructor Details

#initialize(release_name, options = {}) ⇒ History

Returns a new instance of History.



13
14
15
16
17
18
19
20
# File 'lib/rhelm/subcommand/history.rb', line 13

def initialize(release_name, options = {})
  super(options)

  @release_name = release_name
  @help = options[:help]
  @max = options[:max]
  @output = options[:output]
end

Instance Attribute Details

#helpObject (readonly)

Returns the value of attribute help.



8
9
10
# File 'lib/rhelm/subcommand/history.rb', line 8

def help
  @help
end

#maxObject (readonly)

Returns the value of attribute max.



8
9
10
# File 'lib/rhelm/subcommand/history.rb', line 8

def max
  @max
end

#outputObject (readonly)

Returns the value of attribute output.



8
9
10
# File 'lib/rhelm/subcommand/history.rb', line 8

def output
  @output
end

#release_nameObject (readonly)

Returns the value of attribute release_name.



8
9
10
# File 'lib/rhelm/subcommand/history.rb', line 8

def release_name
  @release_name
end

Instance Method Details

#cli_argsObject



26
27
28
29
30
31
32
33
34
# File 'lib/rhelm/subcommand/history.rb', line 26

def cli_args
  super.tap do |args|
    args << "--help" if help
    args << [ '--max', max ] if max
    args << [ '--output', output ] if output

    args << release_name
  end.flatten
end

#subcommand_nameObject



22
23
24
# File 'lib/rhelm/subcommand/history.rb', line 22

def subcommand_name
  "history"
end