Module: DataRelease

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

Instance Method Summary collapse

Instance Method Details

#ena_accession_required?Boolean

Returns:

  • (Boolean)

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

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

  true
end

#for_array_express?Boolean

Returns:

  • (Boolean)

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

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
11
# File 'app/models/data_release.rb', line 4

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

  true
end