Module: DataRelease

Included in:
Study
Defined in:
app/models/data_release.rb

Overview

rubocop:todo Style/Documentation

Instance Method Summary collapse

Instance Method Details

#ena_accession_required?Boolean

Returns:

  • (Boolean)

12
13
14
15
16
17
18
19
# File 'app/models/data_release.rb', line 12

def ena_accession_required?
  return false unless enforce_accessioning
  return true unless valid_data_release_properties?
  # TODO[xxx]: was this removed?
  return false if .never_release?

  true
end

#for_array_express?Boolean

Returns:

  • (Boolean)

21
22
23
# File 'app/models/data_release.rb', line 21

def for_array_express?
  (st = .data_release_study_type) && st.for_array_express
end

#valid_data_release_properties?Boolean

TODO: All of this probably falls into the Study::Metadata class

Returns:

  • (Boolean)

4
5
6
7
8
9
10
# File 'app/models/data_release.rb', line 4

def valid_data_release_properties?
  return true unless enforce_data_release
  return false if .data_release_strategy.try(:blank?)
  return false if .data_release_timing.try(:blank?)

  true
end