Class: Bio::PhyloXML::Id
- Inherits:
-
Object
- Object
- Bio::PhyloXML::Id
- Defined in:
- lib/bio/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.
726 727 728 |
# File 'lib/bio/phyloxml/elements.rb', line 726 def provider @provider end |
#value ⇒ Object
The value of Id.
728 729 730 |
# File 'lib/bio/phyloxml/elements.rb', line 728 def value @value end |
Instance Method Details
#to_xml ⇒ Object
Converts elements to xml representation. Called by PhyloXML::Writer class.
731 732 733 734 735 |
# File 'lib/bio/phyloxml/elements.rb', line 731 def to_xml xml_node = LibXML::XML::Node.new('id', @value) xml_node["provider"] = @provider if @provider != nil return xml_node end |