Class: Descriptor::Qualitative
- Inherits:
-
Descriptor
- Object
- Descriptor
- Descriptor::Qualitative
- 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.
Instance Method Summary collapse
Instance Method Details
#has_gap_state? ⇒ Boolean
10 11 12 13 14 15 16 |
# File 'app/models/descriptor/qualitative.rb', line 10 def has_gap_state? character_states.each do |c| return true if c.is_gap? end false end |
#reject_character_states(attributes) ⇒ Object (protected)
20 21 22 |
# File 'app/models/descriptor/qualitative.rb', line 20 def reject_character_states(attributes) attributes[:name].blank? || attributes[:label].blank? end |