Class: NomenclaturalRank::Icn::GenusGroup
Defined Under Namespace
Classes: Genus, Section, Series, Subgenus, Subsection, Subseries
Constant Summary
KINGDOM
Class Method Summary
collapse
Instance Method Summary
collapse
group_base
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
3
4
5
6
7
|
# File 'app/models/nomenclatural_rank/icn/genus_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
taxon_name.errors.add(:name, 'name must not end in -virus') if (taxon_name.name =~ /.*virus\Z/) && taxon_name.name.length > 1
end
|
Instance Method Details
#parent_rank ⇒ Object
9
10
11
|
# File 'app/models/nomenclatural_rank/icn/genus_group.rb', line 9
def parent_rank
nil
end
|