Class: NomenclaturalRank::Icn::FamilyGroup

Inherits:
NomenclaturalRank::Icn show all
Defined in:
app/models/nomenclatural_rank/icn/family_group.rb

Direct Known Subclasses

Family, Subfamily, Subtribe, Tribe

Defined Under Namespace

Classes: Family, Subfamily, Subtribe, Tribe

Class Method Summary (collapse)

Methods inherited from NomenclaturalRank

abbreviation, bottom_rank, collect_descendants_to_s, collect_to_s, nomenclatural_code, nomenclatural_code_class, ordered_ranks, parent_rank, rank_name, top_rank, typical_use, #valid_name_ending

Class Method Details

+ (Object) valid_parents



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

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

+ (Object) validate_name_format(taxon_name)



3
4
5
# File 'app/models/nomenclatural_rank/icn/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.blank? && taxon_name.name == taxon_name.name.capitalize
end