A date associated with a clade/node. Its value can be numerical by using the ‘value’ element and/or free text with the ‘desc’ element’ (e.g. ‘Silurian’). If a numerical value is used, it is recommended to employ the ‘unit’ attribute to indicate the type of the numerical value (e.g. ‘mya’ for ‘million years ago’).
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 810 def maximum=(str) @maximum = str.to_i end
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 806 def minimum=(str) @minimum = str.to_i end
Returns value + unit, for exampe “7 mya”
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 819 def to_s return "#{value} #{unit}" end
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 824 def to_xml date = LibXML::XML::Node.new('date') PhyloXML::Writer.generate_xml(date, self, [ [:attr, 'unit'], [:simple, 'desc', @desc], [:simple, 'value', @value], [:simple, 'minimum', @minimum], [:simple, 'maximum', @maximum]]) return date end
Generated with the Darkfish Rdoc Generator 2.