Class: Eol::Pages
Overview
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.
Instance Attribute Summary collapse
-
#data_objects ⇒ Array
An Array of Hashes.
-
#richness_score ⇒ 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.
-
#scientific_name ⇒ String
Binomial nomenclature in zoology.
-
#taxon_concepts ⇒ Array
An Array of Hashes.
Instance Method Summary collapse
- #each {|@scientific_name| ... } ⇒ Object
-
#initialize(response) ⇒ Pages
constructor
A new instance of Pages.
Constructor Details
#initialize(response) ⇒ Pages
Returns a new instance of Pages.
23 24 25 26 27 28 |
# 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 |
Instance Attribute Details
#data_objects ⇒ Array
Returns an Array of Hashes.
21 22 23 |
# File 'lib/eol/pages.rb', line 21 def data_objects @data_objects end |
#richness_score ⇒ 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.
17 18 19 |
# File 'lib/eol/pages.rb', line 17 def richness_score @richness_score end |
#scientific_name ⇒ String
Returns binomial nomenclature in zoology.
11 12 13 |
# File 'lib/eol/pages.rb', line 11 def scientific_name @scientific_name end |
#taxon_concepts ⇒ Array
Returns an Array of Hashes.
19 20 21 |
# File 'lib/eol/pages.rb', line 19 def taxon_concepts @taxon_concepts end |
Instance Method Details
#each {|@scientific_name| ... } ⇒ Object
30 31 32 33 34 35 |
# File 'lib/eol/pages.rb', line 30 def each yield @scientific_name yield @richness_score yield @taxon_concepts yield @data_objects end |