Class: Bio::NeXML::FloatEdge

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

Overview

A float edge is an edge whose length is defined using a floating point number.

Instance Attribute Summary

Attributes inherited from Edge

#id, #label, #source, #target

Instance Method Summary collapse

Methods inherited from Edge

#length=, #to_xml

Methods included from Mapper

#properties

Constructor Details

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

Returns a new instance of FloatEdge.



138
139
140
# File 'lib/bio/db/nexml/trees.rb', line 138

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

Instance Method Details

#lengthObject



141
142
143
# File 'lib/bio/db/nexml/trees.rb', line 141

def length
  distance.to_f
end