Class: DataReleaseStudyType

Inherits:
ApplicationRecord show all
Extended by:
Attributable::Association::Target
Defined in:
app/models/data_release_study_type.rb

Defined Under Namespace

Modules: Associations

Constant Summary collapse

DATA_RELEASE_TYPES_SAMPLES =
['genotyping or cytogenetics']
DATA_RELEASE_TYPES_STUDIES =
[]

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Attributable::Association::Target

default, extended, for_select_association

Methods inherited from ApplicationRecord

convert_labware_to_receptacle_for, find_by_id_or_name, find_by_id_or_name!

Methods included from Warren::BroadcastMessages

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

Class Method Details

.defaultObject


27
28
29
# File 'app/models/data_release_study_type.rb', line 27

def self.default
  find_by(is_default: true)
end

Instance Method Details

#is_not_specified?Boolean

Returns:

  • (Boolean)

15
16
17
# File 'app/models/data_release_study_type.rb', line 15

def is_not_specified?
  false
end

#samples_excluded_for_release?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'app/models/data_release_study_type.rb', line 23

def samples_excluded_for_release?
  DATA_RELEASE_TYPES_SAMPLES.include?(name)
end

#studies_excluded_for_release?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'app/models/data_release_study_type.rb', line 19

def studies_excluded_for_release?
  DATA_RELEASE_TYPES_STUDIES.include?(name)
end