Class: ADT::ColumnType::Binary

Inherits:
Base
  • Object
show all
Defined in:
lib/adt/column_type.rb

Instance Method Summary collapse

Instance Method Details

#flagObject



36
37
38
# File 'lib/adt/column_type.rb', line 36

def flag
  ''
end

#type_cast(value, table) ⇒ Object

Raises:



28
29
30
31
32
33
34
# File 'lib/adt/column_type.rb', line 28

def type_cast(value, table)
  raise MemoryError, '.adm file is missing' unless table.memory?

  offset, length = value.unpack('I*')
  table.memory.seek(offset * 8)
  table.memory.read(length)
end