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/elements.rb, line 483 def initialize @points = [] end
Public Instance Methods
to_xml()
click to toggle source
Converts elements to xml representation. Called by PhyloXML::Writer
class.
# File lib/bio/phyloxml/elements.rb, line 489 def to_xml if @points.length > 2 pol = LibXML::XML::Node.new('polygon') @points.each do |p| pol << p.to_xml end return pol end end