class Bio::BioAlignment::Row
Support the notion of Rows
in an alignment. A Row
can have state by attaching state objects
Public Class Methods
new(aln, row)
click to toggle source
# File lib/bio-alignment/rows.rb, line 28 def initialize aln, row @aln = aln @row = row freeze end
Public Instance Methods
count(&block)
click to toggle source
# File lib/bio-alignment/rows.rb, line 34 def count &block counter = 0 each do | e | found = if e.kind_of?(String) block.call(Element.new(e)) else block.call(e) end counter += 1 if found end counter end