Module: Bolognese::Writers::CitationWriter

Included in:
MetadataUtils
Defined in:
lib/bolognese/writers/citation_writer.rb

Instance Method Summary collapse

Instance Method Details

#citationObject



6
7
8
9
10
11
# File 'lib/bolognese/writers/citation_writer.rb', line 6

def citation
  cp = CiteProc::Processor.new(style: style, locale: locale, format: 'html')
  cp.import Array.wrap(citeproc_hsh)
  bibliography = cp.render :bibliography, id: normalize_doi(doi)
  bibliography.first
end