Class | Bio::PhyloXML::Distribution |
In: |
lib/bio/db/phyloxml/phyloxml_elements.rb
|
Parent: | Object |
The geographic distribution of the items of a clade (species, sequences), intended for phylogeographic applications.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 414 414: def initialize 415: @points = [] 416: @polygons = [] 417: end
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 421 421: def to_xml 422: distr = LibXML::XML::Node.new('distribution') 423: PhyloXML::Writer.generate_xml(distr, self, [ 424: [:simple, 'desc', @desc], 425: [:objarr, 'point', 'points'], 426: [:objarr, 'polygon', 'polygons']]) 427: return distr 428: end