Class: Bio::NeXML::IntEdge

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

Overview

An int edge is an edge whose length is defined using an integer

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 = {}) ⇒ IntEdge

Returns a new instance of IntEdge.



148
149
150
# File 'lib/bio/db/nexml/trees.rb', line 148

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

Instance Method Details

#lengthObject



151
152
153
# File 'lib/bio/db/nexml/trees.rb', line 151

def length
  distance.to_i
end