Method: Bio::Reference#rd

Defined in:
lib/bio/reference.rb

#rd(str = nil) ⇒ Object

Return reference formatted in the RD style.

# ref is a Bio::Reference object
puts ref.rd

  == Title of the study.

  * Hoge, J.P. and Fuga, F.B.

  * Theor. J. Hoge 2001 12:123-145 [PMID:12345678]

  Hoge fuga. ...

An optional string argument can be supplied, but does nothing.


Arguments:

  • (optional) str: String (default nil)

Returns

String



374
375
376
377
378
379
380
381
382
# File 'lib/bio/reference.rb', line 374

def rd(str = nil)
  @abstract ||= str
  lines = []
  lines << "== " + @title
  lines << "* " + authors_join(' and ')
  lines << "* #{@journal} #{@year} #{@volume}:#{@pages} [PMID:#{@pubmed}]"
  lines << @abstract
  return lines.join("\n\n")
end