Class: Terrier::DoiData
- Inherits:
-
Object
- Object
- Terrier::DoiData
- Includes:
- HTTParty
- Defined in:
- lib/terrier/doi_data.rb
Instance Attribute Summary collapse
-
#citation_info ⇒ Object
readonly
Returns the value of attribute citation_info.
-
#doi ⇒ Object
readonly
Returns the value of attribute doi.
Instance Method Summary collapse
- #data ⇒ Object
-
#initialize(doi) ⇒ DoiData
constructor
A new instance of DoiData.
Constructor Details
#initialize(doi) ⇒ DoiData
Returns a new instance of DoiData.
5 6 7 |
# File 'lib/terrier/doi_data.rb', line 5 def initialize(doi) @doi = doi end |
Instance Attribute Details
#citation_info ⇒ Object (readonly)
Returns the value of attribute citation_info.
3 4 5 |
# File 'lib/terrier/doi_data.rb', line 3 def citation_info @citation_info end |
#doi ⇒ Object (readonly)
Returns the value of attribute doi.
3 4 5 |
# File 'lib/terrier/doi_data.rb', line 3 def doi @doi end |
Instance Method Details
#data ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/terrier/doi_data.rb', line 9 def data @citation_info = doi_citation_info { url: citation_info["URL"], journal: citation_info["container-title"], publisher: citation_info["publisher"], title: citation_info["title"], authors: , publication_year: publication_year, issn: citation_info["ISSN"], bibliography: bibliography } end |