Class: DBF::ColumnType::Boolean

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

Instance Attribute Summary

Attributes inherited from Base

#decimal, #encoding

Instance Method Summary collapse

Methods inherited from Base

#decode, #initialize

Constructor Details

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

Instance Method Details

#blank_valueObject



89
# File 'lib/dbf/column_type.rb', line 89

def blank_value = false

#skip_blank?Boolean

Returns:



88
# File 'lib/dbf/column_type.rb', line 88

def skip_blank? = true

#type_cast(value) ⇒ Object

Parameters:



92
93
94
95
# File 'lib/dbf/column_type.rb', line 92

def type_cast(value)
  byte = value.getbyte(0)
  byte == 89 || byte == 121 || byte == 84 || byte == 116 # Y y T t
end