Class: NomenclaturalRank::Iczn::FamilyGroup

Inherits:
NomenclaturalRank::Iczn show all
Defined in:
app/models/nomenclatural_rank/iczn/family_group.rb

Defined Under Namespace

Classes: Epifamily, Family, Infrafamily, Infratribe, Subfamily, SubfamilyGroup, Subtribe, Superfamily, SuperfamilyGroup, Supertribe, Tribe

Constant Summary

ENDINGS =
%w{ini ina inae idae oidae odd ad oidea}

Class Method Summary collapse

Methods inherited from NomenclaturalRank::Iczn

group_base

Methods inherited from NomenclaturalRank

abbreviation, bottom_rank, nomenclatural_code, nomenclatural_code_class, parent_rank, rank_name, top_rank, typical_use

Class Method Details

.valid_parentsObject



7
8
9
10
11
# File 'app/models/nomenclatural_rank/iczn/family_group.rb', line 7

def self.valid_parents
  self.collect_descendants_to_s(
      NomenclaturalRank::Iczn::HigherClassificationGroup,
      NomenclaturalRank::Iczn::FamilyGroup)
end

.validate_name_format(taxon_name) ⇒ Object



3
4
5
# File 'app/models/nomenclatural_rank/iczn/family_group.rb', line 3

def self.validate_name_format(taxon_name)
  taxon_name.errors.add(:name, 'name must be capitalized') unless taxon_name.name == taxon_name.name.capitalize
end