Class: Descriptor::Qualitative

Inherits:
Descriptor show all
Defined in:
app/models/descriptor/qualitative.rb

Overview

A descriptor that has qualitative states. For example a phylogenetic character. Also used for descriptive matrices. Note that presence/absence descriptors have their own subclass and should be represented there to maximize utility.

Constant Summary

Constants inherited from Descriptor

ALTERNATE_VALUES_FOR

Constants included from SoftValidation

SoftValidation::ANCESTORS_WITH_SOFT_VALIDATIONS

Instance Method Summary collapse

Methods inherited from Descriptor

#gene?, human_name, #presence_absence?, #qualitative?, #short_name_is_shorter, #sv_short_name_is_short, #target_name, #type_is_subclassed

Methods included from SoftValidation

#clear_soft_validations, #fix_soft_validations, #soft_fixed?, #soft_valid?, #soft_validate, #soft_validated?, #soft_validations

Methods included from Shared::IsData

#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar

Methods included from Shared::Documentation

#document_array=, #documented?, #reject_documentation, #reject_documents

Methods included from Shared::Confidences

#reject_confidences

Methods included from Shared::AlternateValues

#all_values_for, #alternate_valued?

Methods included from Shared::DataAttributes

#import_attributes, #internal_attributes, #keyword_value_hash, #reject_data_attributes

Methods included from Shared::Depictions

#has_depictions?, #image_array=, #reject_depictions, #reject_images

Methods included from Shared::Notes

#concatenated_notes_string, #reject_notes

Methods included from Shared::Tags

#reject_tags, #tag_with, #tagged?, #tagged_with?

Methods included from Shared::Identifiers

#identified?, #next_by_identifier, #previous_by_identifier, #reject_identifiers

Methods included from Shared::Citations

#cited?, #mark_citations_for_destruction, #nomenclature_date, #origin_citation_source_id, #reject_citations, #requires_citation?, #sources_by_topic_id

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods inherited from ApplicationRecord

transaction_with_retry

Instance Method Details

#reject_character_states(attributes) ⇒ Object (protected)



12
13
14
# File 'app/models/descriptor/qualitative.rb', line 12

def reject_character_states(attributes)
  attributes[:name].blank? || attributes[:label].blank?
end