Class: KubeDeployTools::Publish::Optparser::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/kube_deploy_tools/publish/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOptions

Returns a new instance of Options.



8
9
10
# File 'lib/kube_deploy_tools/publish/options.rb', line 8

def initialize
  self.output_path = File.join('build', 'kubernetes')
end

Instance Attribute Details

#manifest_fileObject

Returns the value of attribute manifest_file.



6
7
8
# File 'lib/kube_deploy_tools/publish/options.rb', line 6

def manifest_file
  @manifest_file
end

#output_pathObject

Returns the value of attribute output_path.



6
7
8
# File 'lib/kube_deploy_tools/publish/options.rb', line 6

def output_path
  @output_path
end

Instance Method Details

#define_options(parser) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/kube_deploy_tools/publish/options.rb', line 12

def define_options(parser)
  parser.on('-mMANIFEST', '--manifest MANIFEST', 'The configuration MANIFEST to render deploys with.') do |f|
    self.manifest_file = f
  end

  parser.on('-oPATH', '--output-path PATH', 'Path where rendered manifests are written.') do |p|
    self.output_path = p
  end

  parser.on('-')
end