Class: Bio::PhyloXML::Id
- Inherits:
-
Object
- Object
- Bio::PhyloXML::Id
- Defined in:
- lib/bio-phyloxml/phyloxml_elements.rb
Instance Attribute Summary collapse
-
#provider ⇒ Object
The provider of Id, for example, NCBI.
-
#value ⇒ Object
The value of Id.
Instance Method Summary collapse
-
#to_xml ⇒ Object
Converts elements to xml representation.
Instance Attribute Details
#provider ⇒ Object
The provider of Id, for example, NCBI.
732 733 734 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 732 def provider @provider end |
#value ⇒ Object
The value of Id.
734 735 736 |
# File 'lib/bio-phyloxml/phyloxml_elements.rb', line 734 def value @value end |
Instance Method Details
#to_xml ⇒ Object
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 |