Class: DBF::ColumnType::Memo

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

Constant Summary

Constants inherited from Base

Base::ENCODING_ARGS

Instance Attribute Summary

Attributes inherited from Base

#decimal, #encoding

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from DBF::ColumnType::Base

Instance Method Details

#type_cast(value) ⇒ Object



80
81
82
83
84
85
86
# File 'lib/dbf/column_type.rb', line 80

def type_cast(value)
  if encoding && !value.nil?
    value.force_encoding(@encoding).encode(*ENCODING_ARGS)
  else
    value
  end
end