class Bio::PhyloXML::Reference

Description

A literature reference for a clade. It is recommended to use the 'doi' attribute instead of the free text 'desc' element whenever possible.

Attributes

desc[RW]

String. Free text description.

doi[RW]

String. Digital Object Identifier.

Public Instance Methods

to_xml() click to toggle source

Converts elements to xml representation. Called by PhyloXML::Writer class.

# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 999
def to_xml
  ref = LibXML::XML::Node.new('reference')
  Writer.generate_xml(ref, self, [
        [:attr, 'doi'],
        [:simple, 'desc', (defined? @desc) ? @desc : nil]])
   return ref
end