Class: KCommercial::KCPipeline::Command::AppDemo

Inherits:
KCommercial::KCPipeline::Command show all
Defined in:
lib/KCommercialPipeline/command/app_runner.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from KCommercial::KCPipeline::Command

#validate!

Constructor Details

#initialize(argv) ⇒ AppDemo

Returns a new instance of AppDemo.



21
22
23
24
25
26
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 21

def initialize(argv)
  @build_type = argv.option('build_type')
  @keep_task_id = argv.option('keep_task_id') || 0
  @slice_paths = argv.all_options('slice')
  super
end

Instance Attribute Details

#addition_slicesObject (readonly)

Returns the value of attribute addition_slices.



10
11
12
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 10

def addition_slices
  @addition_slices
end

#app_idObject

Returns the value of attribute app_id.



7
8
9
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 7

def app_id
  @app_id
end

#build_typeObject

Returns the value of attribute build_type.



8
9
10
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 8

def build_type
  @build_type
end

#keep_task_idObject

Returns the value of attribute keep_task_id.



9
10
11
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 9

def keep_task_id
  @keep_task_id
end

Class Method Details

.optionsObject



14
15
16
17
18
19
20
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 14

def self.options
  [
    ['--build_type',"Debug or Release"],
    ['--keep_task_id',"keep组件任务id"],
    ['--slice=PATH', 'The path of the slice that is addition'],
  ].concat(super)
end

Instance Method Details

#runObject



28
29
30
# File 'lib/KCommercialPipeline/command/app_runner.rb', line 28

def run
  RunDemo.new(@build_type,@app_id,@keep_task_id,@slice_paths).run
end