Class: Eol::DataObjects
- Inherits:
-
Object
- Object
- Eol::DataObjects
- Includes:
- Enumerable
- Defined in:
- lib/eol/data_objects.rb
Overview
Contains all metadata about the object as submitted to EOL by the contributing content partner.
Instance Attribute Summary collapse
-
#data_objects ⇒ Array
An Array of Hashes.
-
#exemplar ⇒ FalseClass or TrueClass
Status of exemplar.
-
#identifier ⇒ Integer
An identifier number.
-
#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
The binomial nomenclature in zoology.
-
#taxon_concepts ⇒ Array
An Array of Hashes.
Instance Method Summary collapse
- #each {|@identifier| ... } ⇒ Object
-
#initialize(response) ⇒ DataObjects
constructor
A new instance of DataObjects.
Constructor Details
#initialize(response) ⇒ DataObjects
Returns a new instance of DataObjects.
25 26 27 28 29 30 31 32 |
# File 'lib/eol/data_objects.rb', line 25 def initialize(response) self.identifier = response['identifier'] self.scientific_name = response['scientificName'] self.exemplar = response['exemplar'] 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.
23 24 25 |
# File 'lib/eol/data_objects.rb', line 23 def data_objects @data_objects end |
#exemplar ⇒ FalseClass or TrueClass
Returns status of exemplar.
13 14 15 |
# File 'lib/eol/data_objects.rb', line 13 def exemplar @exemplar end |
#identifier ⇒ Integer
Returns an identifier number.
9 10 11 |
# File 'lib/eol/data_objects.rb', line 9 def identifier @identifier 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.
19 20 21 |
# File 'lib/eol/data_objects.rb', line 19 def richness_score @richness_score end |
#scientific_name ⇒ String
Returns the binomial nomenclature in zoology.
11 12 13 |
# File 'lib/eol/data_objects.rb', line 11 def scientific_name @scientific_name end |
#taxon_concepts ⇒ Array
Returns An Array of Hashes.
21 22 23 |
# File 'lib/eol/data_objects.rb', line 21 def taxon_concepts @taxon_concepts end |
Instance Method Details
#each {|@identifier| ... } ⇒ Object
34 35 36 37 38 39 40 41 |
# File 'lib/eol/data_objects.rb', line 34 def each yield @identifier yield @scientific_name yield @exemplar yield @richness_score yield @taxon_concepts yield @data_objects end |