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

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

human_name, #qualitative?, #short_name_is_shorter, #sv_short_name_is_short, #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 Housekeeping

#has_polymorphic_relationship?

Methods included from ActiverecordUtilities

#trim_attributes

Instance Method Details

- (Object) reject_character_states(attributes) (protected)



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

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