app/models/data_file.rb
def extract_samples(sample_type, confirm = false)
    samples = sample_type.build_samples_from_template(self.content_blob)
    extracted = []
    samples.each do |sample|
      sample.project_ids = self.project_ids
      sample.contributor = self.contributor
      sample.originating_data_file = self
      sample.policy = self.policy.deep_copy
      sample.save if sample.valid? && confirm

      extracted << sample
    end
    extracted
  end
# Extracts samples using the given sample_type
# Returns a list of extracted samples, including
Extracts samples using the given sample_type
Returns a list of extracted samples, including
Extracts samples using the given sample_type Returns a list of extracted samples including
def extract_samples(sample_type, confirm = false)
    samples = sample_type.build_samples_from_template(self.content_blob)
    extracted = []
    samples.each do |sample|
      sample.project_ids = self.project_ids
      sample.contributor = self.contributor
      sample.originating_data_file = self
      sample.policy = self.policy.deep_copy
      sample.save if sample.valid? && confirm
      extracted << sample
    end
    extracted
  end
def extract_samples ( sample_type , confirm = false ) samples = sample_type . build_samples_from_template ( self . content_blob ) extracted = [ ] samples . each do | sample | sample . project_ids = self . project_ids sample . contributor = self . contributor sample . originating_data_file = self sample . policy = self . policy . deep_copy sample . save if sample . valid? && confirm extracted << sample end extracted end
Extracts samples using the given sample_type
Returns a list of extracted samples, including
Extracts samples using the given sample_type Returns a list of extracted samples including
sample_type
confirm