Class: Bio::NeXML::CellRow

Inherits:
Row
  • Object
show all
Defined in:
lib/bio/db/nexml/matrix.rb

Constant Summary collapse

@@writer =
Bio::NeXML::Writer.new

Instance Attribute Summary

Attributes inherited from Row

#id, #label

Instance Method Summary collapse

Methods inherited from Row

#initialize

Methods included from Mapper

#properties

Constructor Details

This class inherits a constructor from Bio::NeXML::Row

Instance Method Details

#add_cell(cell) ⇒ Object

Add a cell to the row

  • Arguments :

cell( required ) - a Bio::NeXML::Cell object.

  • Returns : self.

    row.add_cell( cell )
    row.cells               #=> [ .. cell .. ]
    cell.row                #=> row
    


741
742
743
# File 'lib/bio/db/nexml/matrix.rb', line 741

def add_cell( cell )
  # dummy for rdoc
end

#to_xmlObject



788
789
790
791
792
793
794
# File 'lib/bio/db/nexml/matrix.rb', line 788

def to_xml
  node = @@writer.create_node( "row", @@writer.attributes( self, :id, :otu, :label ) )
  self.each_cell do |cell|
    node << cell.to_xml
  end
  node
end