Class: Puree::Extractor::JournalArticle

Inherits:
Resource
  • Object
show all
Defined in:
lib/puree/extractor/journal_article.rb

Overview

Journal article extractor.

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Puree::Extractor::Resource

Instance Method Details

#find(id) ⇒ Puree::Model::JournalArticle?

Parameters:

  • id (String)

Returns:



10
11
12
13
14
# File 'lib/puree/extractor/journal_article.rb', line 10

def find(id)
  super id: id,
        api_resource_type: :research_output,
        xml_extractor_resource_type: :journal_article
end

#random(params = {}) ⇒ Puree::Model::JournalArticle?

Random record.

Parameters:

  • params (Hash) (defaults to: {})

    Combined GET and POST parameters for all records

Returns:



20
21
22
# File 'lib/puree/extractor/journal_article.rb', line 20

def random(params = {})
  record_count :journal_article, params
end