Class: Bio::PhyloXML::Id
- Defined in:
- lib/bio/db/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.
734 735 736 |
# File 'lib/bio/db/phyloxml/phyloxml_elements.rb', line 734 def provider @provider end |
#value ⇒ Object
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_xml ⇒ Object
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 |