Class | Bio::PhyloXML::Polygon |
In: |
lib/bio/db/phyloxml/phyloxml_elements.rb
|
Parent: | Object |
points | [RW] | Array of Point objects. |
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 491 491: def initialize 492: @points = [] 493: end
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 497 497: def to_xml 498: if @points.length > 2 499: pol = LibXML::XML::Node.new('polygon') 500: @points.each do |p| 501: pol << p.to_xml 502: end 503: return pol 504: end 505: end