Module: Shared::BiologicalExtensions
- Extended by:
- ActiveSupport::Concern
- Included in:
- CollectionObject, FieldOccurrence
- Defined in:
- app/models/concerns/shared/biological_extensions.rb
Overview
Shared code that references things with TaxonDeterminations and Biocuration classes
Current FieldOccurence
CollectionObject (should be CollectionObject::BiologicalCollectionObject)
Instance Method Summary collapse
-
#missing_determination ⇒ Object
see BiologicalCollectionObject.
-
#name_at_rank_string(rank) ⇒ String
Ugh: TODO: deprecate! no utility gained here, and it’s HTML!!!.
- #reject_otus(attributed) ⇒ Object
- #reject_taxon_determinations(attributed) ⇒ Boolean
- #requires_taxon_determination? ⇒ Boolean
Instance Method Details
#missing_determination ⇒ Object
see BiologicalCollectionObject
73 74 |
# File 'app/models/concerns/shared/biological_extensions.rb', line 73 def missing_determination end |
#name_at_rank_string(rank) ⇒ String
Ugh: TODO: deprecate! no utility gained here, and it’s HTML!!!
83 84 85 |
# File 'app/models/concerns/shared/biological_extensions.rb', line 83 def name_at_rank_string(rank) current_taxon_name.try(:ancestor_at_rank, rank).try(:cached_html) end |
#reject_otus(attributed) ⇒ Object
92 93 94 95 96 |
# File 'app/models/concerns/shared/biological_extensions.rb', line 92 def reject_otus(attributed) a = attributed['taxon_name_id'] b = attributed['name'] a.blank? && b.blank? end |
#reject_taxon_determinations(attributed) ⇒ Boolean
88 89 90 |
# File 'app/models/concerns/shared/biological_extensions.rb', line 88 def reject_taxon_determinations(attributed) attributed['otu_id'].blank? && attributed[:otu]&.id.blank? end |
#requires_taxon_determination? ⇒ Boolean
76 77 78 |
# File 'app/models/concerns/shared/biological_extensions.rb', line 76 def requires_taxon_determination? false end |