class Bio::PhyloXML::Polygon
Description¶ ↑
A polygon defined by a list of Points objects.
Attributes
points[RW]
Array of Point
objects.
Public Class Methods
new()
click to toggle source
# File lib/bio-phyloxml/phyloxml_elements.rb 489 def initialize 490 @points = [] 491 end
Public Instance Methods
to_xml()
click to toggle source
Converts elements to xml representation. Called by PhyloXML::Writer
class.
# File lib/bio-phyloxml/phyloxml_elements.rb 495 def to_xml 496 if @points.length > 2 497 pol = LibXML::XML::Node.new('polygon') 498 @points.each do |p| 499 pol << p.to_xml 500 end 501 return pol 502 end 503 end