File: dbase3.rb

package info (click to toggle)
ruby-dbf 4.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,732 kB
  • sloc: ruby: 1,692; makefile: 9
file content (16 lines) | stat: -rw-r--r-- 372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module DBF
  module Memo
    class Dbase3 < Base
      def build_memo(start_block) # :nodoc:
        @data.seek offset(start_block)
        memo_string = ''
        loop do
          block = @data.read(BLOCK_SIZE).gsub(/(\000|\032)/, '')
          memo_string << block
          break if block.size < BLOCK_SIZE
        end
        memo_string
      end
    end
  end
end