Splitter for Bio::FlatFile
gets an entry
# File lib/bio/appl/fasta/format10.rb, line 35 def get_entry p0 = stream_pos() pieces = [] overrun = nil first = true while e = stream.gets(@delimiter) pieces.push e if @real_delimiter =~ e then if first then first = nil else overrun = $& break end end end ent = (pieces.empty? ? nil : pieces.join('')) if ent and overrun then ent[-overrun.length, overrun.length] = '' stream.ungets(overrun) end p1 = stream_pos() self.entry_start_pos = p0 self.entry = ent self.entry_ended_pos = p1 return ent end
Generated with the Darkfish Rdoc Generator 2.