class Bio::NeXML::Sequence
Attributes
id[RW]
Because seq elements don’t have id attributes, we will use object_id in this case
value[RW]
Public Class Methods
new( options = {} )
click to toggle source
# File lib/bio/db/nexml/matrix.rb, line 510 def initialize( options = {} ) properties( options ) unless options.empty? @id = self.object_id block.arity < 1 ? instance_eval( &block ) : block.call( self ) if block_given? end
Public Instance Methods
each_value( ) { |value| ... }
click to toggle source
# File lib/bio/db/nexml/matrix.rb, line 521 def each_value( &block ) # :yields: value if block_given? cells.each { |c| yield c.value } else enum_for( :each_value ) end end
to_xml()
click to toggle source
# File lib/bio/db/nexml/matrix.rb, line 529 def to_xml node = @@writer.create_node( "seq" ) node << self.value node end
type()
click to toggle source
# File lib/bio/db/nexml/matrix.rb, line 516 def type return nil if cells.empty? cells.first.bound? ? :granular : :raw end