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



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

def blank_value = false

#skip_blank?Boolean

Returns:



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

def skip_blank? = true

#type_cast(value) ⇒ Object

Parameters:



95
96
97
98
# File 'lib/dbf/column_type.rb', line 95

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