class Bio::NeXML::CellRow
Public Instance Methods
add_cell( cell )
click to toggle source
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
# File lib/bio/db/nexml/matrix.rb, line 741 def add_cell( cell ) # dummy for rdoc end
cells()
click to toggle source
Returns an array of cells ( Bio::NeXML::Cell
objects ) for the row.
matrix.cells #=> [ .. .. ]
# File lib/bio/db/nexml/matrix.rb, line 758 def cells # dummy for rdoc end
cells=( cells )
click to toggle source
Add cells to the row. This function will override previous cells if any.
-
Arguments :
cells( required ) - an array of Bio::NeXML::Cell
object.
row.cells = [ cells ] row.cells #=> [ cells ] cell.row #=> row
# File lib/bio/db/nexml/matrix.rb, line 768 def cells=( cells ) # dummy for rdoc end
delete_cell( cell )
click to toggle source
Remove a cell from the row
-
Arguments :
cell( required ) - a Bio::NeXML::Cell
object.
-
Returns : the deleted object.
row.delete_cell( cell ) row.cells #=> [ .. .. ] cell.row #=> nil
# File lib/bio/db/nexml/matrix.rb, line 752 def delete_cell( cell ) # dummy for rdoc end
each_cell()
click to toggle source
Iterate over each cell ( Bio::NeXML::Cell
object ) defined for the row. Returns an Enumerator if no block is provided.
# File lib/bio/db/nexml/matrix.rb, line 779 def each_cell # dummy for rdoc end
has_cell?( cell )
click to toggle source
Returns true if the given cell( Bio::NeXML::Cell
object ) is defined for the row.
# File lib/bio/db/nexml/matrix.rb, line 773 def has_cell?( cell ) # dummy for rdoc end
number_of_cells()
click to toggle source
Returns the number of cells defined for the row.
# File lib/bio/db/nexml/matrix.rb, line 784 def number_of_cells # dummy for rdoc end
to_xml()
click to toggle source
# 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