Class: Bio::PhyloXML::Id

Inherits:
Object show all
Defined in:
lib/bio/db/phyloxml/phyloxml_elements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#providerObject

The provider of Id, for example, NCBI.


743
744
745
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 743

def provider
  @provider
end

#valueObject

The value of Id.


745
746
747
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 745

def value
  @value
end

Instance Method Details

#to_xmlObject

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


748
749
750
751
752
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 748

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