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.



734
735
736
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 734

def provider
  @provider
end

#valueObject

The value of Id.



736
737
738
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 736

def value
  @value
end

Instance Method Details

#to_xmlObject

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



739
740
741
742
743
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 739

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