Class: Bio::NeXML::RootEdge

Inherits:
Edge
  • Object
show all
Defined in:
lib/bio/db/nexml/trees.rb

Overview

A rootedge is an edge without a source. It is used in context of coalescent trees. RootEdge inherits from Edge so the same functionality is available in rootedge too.

Direct Known Subclasses

FloatRootEdge, IntRootEdge

Constant Summary collapse

@@writer =
Bio::NeXML::Writer.new

Instance Attribute Summary

Attributes inherited from Edge

#id, #label, #source, #target

Instance Method Summary collapse

Methods inherited from Edge

#length, #length=

Methods included from Mapper

#properties

Constructor Details

#initialize(id, options = {}) ⇒ RootEdge

Returns a new instance of RootEdge.



112
113
114
# File 'lib/bio/db/nexml/trees.rb', line 112

def initialize( id, options = {} )
  super
end

Instance Method Details

#to_xmlObject



106
107
108
# File 'lib/bio/db/nexml/trees.rb', line 106

def to_xml
  @@writer.create_node( "rootedge", @@writer.attributes( self, :id, :target, :length, :label ) )
end