Class: QcReport

Inherits:
ApplicationRecord show all
Includes:
AASM, ReportBehaviour, StateMachine
Defined in:
app/models/qc_report.rb

Overview

rubocop:todo Style/Documentation

Defined Under Namespace

Modules: ReportBehaviour, StateMachine Classes: File

Instance Method Summary collapse

Methods included from StateMachine

included

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Squishify

extended

Methods included from Warren::BroadcastMessages

#broadcast, included, #queue_associated_for_broadcast, #queue_for_broadcast, #warren

Instance Method Details

#original_qc_decision(metrics) ⇒ Object


148
149
150
# File 'app/models/qc_report.rb', line 148

def original_qc_decision(metrics)
  product_criteria.asses(metrics)
end

#product_idObject


144
145
146
# File 'app/models/qc_report.rb', line 144

def product_id
  product.try(:id)
end

#schedule_reportObject

Reports are handled asynchronously


136
137
138
# File 'app/models/qc_report.rb', line 136

def schedule_report
  Delayed::Job.enqueue QcReportJob.new(id)
end

#to_paramObject


140
141
142
# File 'app/models/qc_report.rb', line 140

def to_param
  report_identifier
end