Class: NomenclaturalRank::Icnp::GenusGroup
- Inherits:
-
NomenclaturalRank::Icnp
- Object
- NomenclaturalRank
- NomenclaturalRank::Icnp
- NomenclaturalRank::Icnp::GenusGroup
- Defined in:
- app/models/nomenclatural_rank/icnp/genus_group.rb
Defined Under Namespace
Constant Summary
Constants inherited from NomenclaturalRank::Icnp
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from NomenclaturalRank::Icnp
Class Method Details
.valid_parents ⇒ Object
12 13 14 15 16 |
# File 'app/models/nomenclatural_rank/icnp/genus_group.rb', line 12 def self.valid_parents self.collect_descendants_to_s( NomenclaturalRank::Icnp::FamilyGroup, NomenclaturalRank::Icnp::GenusGroup) end |
.validate_name_format(taxon_name) ⇒ Object
3 4 5 6 |
# File 'app/models/nomenclatural_rank/icnp/genus_group.rb', line 3 def self.validate_name_format(taxon_name) taxon_name.errors.add(:name, 'name must be capitalized') if !taxon_name.name.blank? && taxon_name.name != taxon_name.name.capitalize && !taxon_name.name.include?(' ') taxon_name.errors.add(:name, 'name must be at least two letters') unless taxon_name.name.length > 1 end |
Instance Method Details
#parent_rank ⇒ Object
8 9 10 |
# File 'app/models/nomenclatural_rank/icnp/genus_group.rb', line 8 def parent_rank nil end |