class Eol::Pages

Contains returns the scientific name for that page, and optionally contains information about common names, media (text, images and videos), and references to the hierarchies which recognize the taxon described on the page.

Attributes

data_objects[RW]

@return [Array] an Array of Hashes

richness_score[RW]

@return [Integer] EOL has developed a 'Richness Score' for taxon pages which provides a simple summary number for comparing the amount of information available for different pages. @see eol.org/info/521

scientific_name[RW]

@return [String] binomial nomenclature in zoology

taxon_concepts[RW]

@return [Array] an Array of Hashes

Public Class Methods

new(response) click to toggle source
# File lib/eol/pages.rb, line 23
def initialize(response)
  self.scientific_name = response['scientificName']
  self.richness_score = response['richness_score']
  self.taxon_concepts = response['taxonConcepts']
  self.data_objects = response['dataObjects']
end

Public Instance Methods

each() { |scientific_name| ... } click to toggle source
# File lib/eol/pages.rb, line 30
def each
  yield @scientific_name
  yield @richness_score
  yield @taxon_concepts
  yield @data_objects
end