Class: ADT::ColumnType::String

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

Instance Method Summary collapse

Instance Method Details

#flagObject



116
117
118
# File 'lib/adt/column_type.rb', line 116

def flag
  'A'
end

#type_cast(value, _table) ⇒ Object



111
112
113
114
# File 'lib/adt/column_type.rb', line 111

def type_cast(value, _table)
  value = value.strip
  value.force_encoding('UTF-8').encode('UTF-8', undef: :replace, invalid: :replace)
end