Skip to content

Commit

Permalink
Rename Method (collect_descentants_* > collect_descendants_*)
Browse files Browse the repository at this point in the history
Method names of the form collect_descentants_* have been changed to collect_descendants_* to fix a typo introduced in an earlier refactoring.
  • Loading branch information
LocoDelAssembly committed Jan 21, 2014
1 parent ff23dbd commit 40a1e78
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion app/models/nomenclatural_rank.rb
Expand Up @@ -70,7 +70,7 @@ def self.valid_parents
def self.collect_to_s(*args)
args.collect{|arg| arg.to_s}
end
def self.collect_descentants_to_s(*classes)
def self.collect_descendants_to_s(*classes)
ans = []
classes.each do |klass|
ans += klass.descendants.collect{|k| k.to_s}
Expand Down
2 changes: 1 addition & 1 deletion app/models/nomenclatural_rank/icn/family_group.rb
Expand Up @@ -5,7 +5,7 @@ def self.validate_name_format(taxon_name)
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Icn::HigherClassificationGroup,
NomenclaturalRank::Icn::FamilyGroup)
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/nomenclatural_rank/icn/genus_group.rb
Expand Up @@ -10,7 +10,7 @@ def parent_rank
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Icn::FamilyGroup,
NomenclaturalRank::Icn::GenusGroup)
end
Expand Down
Expand Up @@ -6,7 +6,7 @@ def self.validate_name_format(taxon_name)
end

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

Expand Down
Expand Up @@ -6,7 +6,7 @@ def self.validate_name_format(taxon_name)
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Icn::GenusGroup,
NomenclaturalRank::Icn::SpeciesAndInfraspeciesGroup)
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/nomenclatural_rank/iczn/family_group.rb
Expand Up @@ -5,7 +5,7 @@ def self.validate_name_format(taxon_name)
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Iczn::HigherClassificationGroup,
NomenclaturalRank::Iczn::FamilyGroup)
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/nomenclatural_rank/iczn/genus_group.rb
Expand Up @@ -6,7 +6,7 @@ def self.validate_name_format(taxon_name)
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Iczn::FamilyGroup,
NomenclaturalRank::Iczn::GenusGroup)
end
Expand Down
Expand Up @@ -6,7 +6,7 @@ def self.validate_name_format(taxon_name)
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Iczn::HigherClassificationGroup)
end
end
2 changes: 1 addition & 1 deletion app/models/nomenclatural_rank/iczn/species_group.rb
Expand Up @@ -6,7 +6,7 @@ def self.validate_name_format(taxon_name)
end

def self.valid_parents
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Iczn::SpeciesGroup,
NomenclaturalRank::Iczn::GenusGroup)
end
Expand Down
4 changes: 2 additions & 2 deletions app/models/taxon_name_classification.rb
Expand Up @@ -97,14 +97,14 @@ def sv_validate_disjoint_classes
def self.collect_to_s(*args)
args.collect{|arg| arg.to_s}
end
def self.collect_descentants_to_s(*classes)
def self.collect_descendants_to_s(*classes)
ans = []
classes.each do |klass|
ans += klass.descendants.collect{|k| k.to_s}
end
ans
end
def self.collect_descendants_and_itself_to_s(*classes)
classes.collect{|k| k.to_s} + self.collect_descentants_to_s(*classes)
classes.collect{|k| k.to_s} + self.collect_descendants_to_s(*classes)
end
end
2 changes: 1 addition & 1 deletion app/models/taxon_name_classification/icn.rb
@@ -1,7 +1,7 @@
class TaxonNameClassification::Icn < TaxonNameClassification

def self.disjoint_taxon_name_classes
self.collect_descentants_to_s(TaxonNameClassification::Iczn)
self.collect_descendants_to_s(TaxonNameClassification::Iczn)
end

end
2 changes: 1 addition & 1 deletion app/models/taxon_name_classification/iczn.rb
Expand Up @@ -5,7 +5,7 @@ def self.code_applicability_start_year
end

def self.disjoint_taxon_name_classes
self.collect_descentants_to_s(TaxonNameClassification::Icn)
self.collect_descendants_to_s(TaxonNameClassification::Icn)
end

end
6 changes: 3 additions & 3 deletions app/models/taxon_name_classification/iczn/unavailable.rb
Expand Up @@ -20,23 +20,23 @@ module InnerClassFamilyGroup
include InnerClass

def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::FamilyGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::FamilyGroup)
end
end

module InnerClassGenusGroup
include InnerClass

def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::GenusGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::GenusGroup)
end
end

module InnerClassSpeciesGroup
include InnerClass

def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
end
end

Expand Down
Expand Up @@ -19,7 +19,7 @@ class BasedOnFossilGenusFormula < TaxonNameClassification::Iczn::Unavailable::Ex
extend InnerClass

def self.applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::FamilyGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::FamilyGroup)
end
end

Expand All @@ -31,7 +31,7 @@ class Infrasubspecific < TaxonNameClassification::Iczn::Unavailable::Excluded
extend InnerClass

def self.applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
end
end

Expand Down
Expand Up @@ -50,7 +50,7 @@ def code_applicability_start_year
module FamilyGroupRanks

def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::FamilyGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::FamilyGroup)
end
end

Expand All @@ -67,7 +67,7 @@ module InnerClassAfter1999FamilyGroup
module GenusGroupRanks

def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::GenusGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::GenusGroup)
end
end

Expand All @@ -84,7 +84,7 @@ module InnerClassAfter1999GenusGroup
module SpeciesGroupRanks

def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
end
end

Expand Down
Expand Up @@ -9,13 +9,13 @@ def self.disjoint_taxon_name_classes

module InnerClassSpeciesGroup
def applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::SpeciesGroup)
end
end

class NotUninomial < TaxonNameClassification::Iczn::Unavailable::NonBinomial
def self.applicable_ranks
self.collect_descentants_to_s(
self.collect_descendants_to_s(
NomenclaturalRank::Iczn::HigherClassificationGroup,
NomenclaturalRank::Iczn::FamilyGroup,
NomenclaturalRank::Iczn::GenusGroup)
Expand All @@ -38,7 +38,7 @@ def self.disjoint_taxon_name_classes

class SubgenusNotIntercalare < TaxonNameClassification::Iczn::Unavailable::NonBinomial
def self.applicable_ranks
self.collect_descentants_to_s(NomenclaturalRank::Iczn::GenusGroup)
self.collect_descendants_to_s(NomenclaturalRank::Iczn::GenusGroup)
end
def self.disjoint_taxon_name_classes
self.parent.disjoint_taxon_name_classes + self.collect_to_s(
Expand Down
2 changes: 1 addition & 1 deletion app/models/taxon_name_relationship/icn/unaccepting.rb
Expand Up @@ -7,7 +7,7 @@ def self.disjoint_taxon_name_relationships

def self.disjoint_object_classes
self.parent.disjoint_object_classes + self.collect_to_s(
TaxonNameClassification::Icn::NotEffectivelyPublished) + self.collect_descentants_to_s(
TaxonNameClassification::Icn::NotEffectivelyPublished) + self.collect_descendants_to_s(
TaxonNameClassification::Icn::EffectivelyPublished::InvalidlyPublished,
TaxonNameClassification::Iczn::EffectivelyPublished::ValidlyPublished::Illegitimate)
end
Expand Down
Expand Up @@ -8,8 +8,8 @@ def self.disjoint_taxon_name_relationships
end

def self.disjoint_object_classes
self.parent.disjoint_object_classes + self.collect_descentants_and_itself_to_s(
TaxonNameClassification::Iczn::Unavailable) + self.collect_descentants_to_s(
self.parent.disjoint_object_classes + self.collect_descendants_and_itself_to_s(
TaxonNameClassification::Iczn::Unavailable) + self.collect_descendants_to_s(
TaxonNameClassification::Iczn::Available::Invalid)
end

Expand Down
Expand Up @@ -7,8 +7,8 @@ def self.disjoint_subject_classes
end

def self.disjoint_object_classes
self.parent.disjoint_object_classes + self.collect_descentants_and_itself_to_s(
TaxonNameClassification::Iczn::Unavailable) + self.collect_descentants_to_s(
self.parent.disjoint_object_classes + self.collect_descendants_and_itself_to_s(
TaxonNameClassification::Iczn::Unavailable) + self.collect_descendants_to_s(
TaxonNameClassification::Iczn::Available::Valid) + self.collect_to_s(
TaxonNameClassification::Iczn::Available::OfficialIndexOfAvailableNames,
TaxonNameClassification::Iczn::Available::OfficialListOfAvailableNames,
Expand Down

0 comments on commit 40a1e78

Please sign in to comment.