Class: NomenclaturalRank::Iczn::HigherClassificationGroup
- Inherits:
-
NomenclaturalRank::Iczn
- Object
- NomenclaturalRank
- NomenclaturalRank::Iczn
- NomenclaturalRank::Iczn::HigherClassificationGroup
- Defined in:
- app/models/nomenclatural_rank/iczn/higher_classification_group.rb
Direct Known Subclasses
ClassRank, Cohort, Infraclass, Infrakingdom, Infraorder, Infraphylum, Kingdom, Magnorder, Mirorder, Nanorder, Order, Parvorder, Phylum, Subclass, Subkingdom, Suborder, Subphylum, Superclass, Supercohort, Superkingdom, Superorder, Superphylum
Defined Under Namespace
Classes: ClassRank, Cohort, Infraclass, Infrakingdom, Infraorder, Infraphylum, Kingdom, Magnorder, Mirorder, Nanorder, Order, Parvorder, Phylum, Subclass, Subkingdom, Suborder, Subphylum, Superclass, Supercohort, Superkingdom, Superorder, Superphylum
Constant Summary
Constants inherited from NomenclaturalRank::Iczn
Class Method Summary collapse
Methods inherited from NomenclaturalRank::Iczn
Methods inherited from NomenclaturalRank
abbreviation, bottom_rank, collect_descendants_to_s, collect_to_s, nomenclatural_code, nomenclatural_code_class, ordered_ranks, parent, parent_rank, rank_name, top_rank, typical_use, valid_name_ending
Class Method Details
.valid_parents ⇒ Object
8 9 10 11 |
# File 'app/models/nomenclatural_rank/iczn/higher_classification_group.rb', line 8 def self.valid_parents self.collect_descendants_to_s( NomenclaturalRank::Iczn::HigherClassificationGroup) end |
.validate_name_format(taxon_name) ⇒ Object
3 4 5 6 |
# File 'app/models/nomenclatural_rank/iczn/higher_classification_group.rb', line 3 def self.validate_name_format(taxon_name) taxon_name.errors.add(:name, 'name must be capitalized') unless !taxon_name.name.blank? && taxon_name.name == taxon_name.name.capitalize taxon_name.errors.add(:name, 'name must be at least two letters') unless taxon_name.name.length > 1 end |