lib/inat/data/entity/taxon.rb in inat-get-0.8.0.12 vs lib/inat/data/entity/taxon.rb in inat-get-0.8.0.13
- old
+ new
@@ -7,21 +7,27 @@
require_relative '../enums/rank'
require_relative '../enums/iconictaxa'
require_relative 'photo'
-autoload :Observation, 'inat/data/entity/observation'
-# autoload :Photo, 'inat/data/entity/photo'
+module INat::Entity
+ autoload :Observation, 'inat/data/entity/observation'
+end
-class Taxon < Entity
+class INat::Entity::Taxon < INat::Data::Entity
+ include INat::Data::Types
+ include INat::Entity
+
api_path :taxa
api_part :query
api_limit 200
table :taxa
+ # @!group Fields
+
field :is_active, type: Boolean, index: true
# field :ancestry, type: Ancestry
# field :min_species_ancestry, type: Ancestry
field :endemic, type: Boolean
field :iconic_taxon, type: Taxon
@@ -68,9 +74,11 @@
ignore :establishment_means
ignore :preferred_establishment_means
ignore :observations_count
ignore :universal_search_rank
+
+ # @!endgroup
def === other
other.id == self.id || other.ancestor_ids.include?(self.id)
end