1 class PipelineInstance < ArvadosBase
2 attr_accessor :pipeline_template
4 def self.goes_in_folders?
8 def update_job_parameters(new_params)
9 self.components[:steps].each_with_index do |step, i|
10 step[:params].each do |param|
11 if new_params.has_key?(new_param_name = "#{i}/#{param[:name]}") or
12 new_params.has_key?(new_param_name = "#{step[:name]}/#{param[:name]}") or
13 new_params.has_key?(new_param_name = param[:name])
15 %w(hash data_locator).collect(&:to_sym).each do |ptype|
16 param_type = ptype if param.has_key? ptype
18 param[param_type] = new_params[new_param_name]
24 def attribute_editable? attr, *args
25 super && (attr.to_sym == :name ||
26 (attr.to_sym == :components and
27 (self.state == 'New' || self.state == 'Ready')))
30 def attributes_for_display
31 super.reject { |k,v| k == 'components' }