Module: Sequencescape::Behaviour::Qced::QcFile

Defined in:
lib/sequencescape/behaviour/qced.rb

Instance Method Summary collapse

Instance Method Details

#create!(attributes = nil) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/sequencescape/behaviour/qced.rb', line 5

def create!(attributes = nil)
  attributes ||= {}

  new({}, false).tap do |qc_file|
    api.create(actions.create, { 'qc_file' => attributes }, Sequencescape::Api::ModifyingHandler.new(qc_file))
  end
end

#create_from_file!(file, filename) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/sequencescape/behaviour/qced.rb', line 13

def create_from_file!(file, filename)
  attributes ||= {}

  new({}, false).tap do |qc_file|
    api.create_from_file(actions.create, file, filename, 'sequencescape/qc_file', Sequencescape::Api::ModifyingHandler.new(qc_file))
  end
end