Class: Rhelm::Subcommand::Version

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

Overview

Helm version subcommand: ‘helm version [flags]`. docs: helm.sh/docs/helm/helm_version/

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(options = {}) ⇒ Version

Returns a new instance of Version.



12
13
14
15
16
17
18
# File 'lib/rhelm/subcommand/version.rb', line 12

def initialize(options = {})
  super

  @help = options[:help]
  @short = options[:short]
  @template = options[:template]
end

Instance Attribute Details

#helpObject (readonly)

Returns the value of attribute help.



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

def help
  @help
end

#shortObject (readonly)

Returns the value of attribute short.



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

def short
  @short
end

#templateObject (readonly)

Returns the value of attribute template.



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

def template
  @template
end

Instance Method Details

#cli_argsObject



24
25
26
27
28
29
30
# File 'lib/rhelm/subcommand/version.rb', line 24

def cli_args
  super.tap do |args|
    args << '--help' if help
    args << '--short' if short
    args << ['--template', template] if template
  end.flatten
end

#subcommand_nameObject



20
21
22
# File 'lib/rhelm/subcommand/version.rb', line 20

def subcommand_name
  "version"
end