Class: Bio::PhyloXML::Id

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#providerObject

The provider of Id, for example, NCBI.



732
733
734
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 732

def provider
  @provider
end

#valueObject

The value of Id.



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

def value
  @value
end

Instance Method Details

#to_xmlObject

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



737
738
739
740
741
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 737

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