class Bio::NeXML::Char
A char specifies which states apply to matrix columns.
Attributes
id[RW]
A file level unique identifier.
label[RW]
A human readable description.
Public Class Methods
new( id, states = nil, options = {} )
click to toggle source
# File lib/bio/db/nexml/matrix.rb, line 138 def initialize( id, states = nil, options = {} ) @id = id unless states.nil? states.is_a?( Hash ) ? options = states : self.states = states end properties( options ) unless options.empty? block.arity < 1 ? instance_eval( &block ) : block.call( self ) if block_given? end
Public Instance Methods
to_xml()
click to toggle source
# File lib/bio/db/nexml/matrix.rb, line 147 def to_xml @@writer.create_node( "char", @@writer.attributes( self, :id, :states, :label, :codon ) ) end