Class: DBF::Memo::Foxpro
Constant Summary collapse
- FPT_HEADER_SIZE =
512
Constants inherited from Base
Base::BLOCK_HEADER_SIZE, Base::BLOCK_SIZE
Instance Method Summary collapse
-
#build_memo(start_block) ⇒ Object
:nodoc:.
Methods inherited from Base
#close, #closed?, #get, #initialize, open
Constructor Details
This class inherits a constructor from DBF::Memo::Base
Instance Method Details
#build_memo(start_block) ⇒ Object
:nodoc:
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/dbf/memo/foxpro.rb', line 6 def build_memo(start_block) # :nodoc: @data.seek offset(start_block) memo_type, memo_size, memo_string = @data.read(block_size).unpack('NNa*') return nil unless memo_type == 1 && memo_size > 0 if memo_size > block_content_size memo_string << @data.read(content_size(memo_size)) else memo_string = memo_string[0, memo_size] end memo_string rescue StandardError nil end |