Class: Bio::PhyloXML::Id

Inherits:
Object
  • Object
show all
Defined in:
lib/bio/phyloxml/elements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#providerObject

The provider of Id, for example, NCBI.



726
727
728
# File 'lib/bio/phyloxml/elements.rb', line 726

def provider
  @provider
end

#valueObject

The value of Id.



728
729
730
# File 'lib/bio/phyloxml/elements.rb', line 728

def value
  @value
end

Instance Method Details

#to_xmlObject

Converts elements to xml representation. Called by PhyloXML::Writer class.



731
732
733
734
735
# File 'lib/bio/phyloxml/elements.rb', line 731

def to_xml
  xml_node = LibXML::XML::Node.new('id', @value)
  xml_node["provider"] = @provider if @provider != nil
  return xml_node
end