sanger/sequencescape

View on GitHub
app/models/descriptor.rb

Summary

Maintainability
A
0 mins
Test Coverage
C
75%
# frozen_string_literal: true
class Descriptor < ApplicationRecord
  belongs_to :task
  serialize :selection

  def is_required?
    required
  end

  def matches?(search)
    search.descriptors.each { |descriptor| return true if descriptor.name == name && descriptor.value == value }
    false
  end
end