Class: InCSV::Types::Integer

Inherits:
ColumnType show all
Defined in:
lib/incsv/types/integer.rb

Overview

Represents a whole integer

Instance Method Summary collapse

Methods inherited from ColumnType

clean_value, #clean_value, for_database, #initialize, name

Constructor Details

This class inherits a constructor from InCSV::ColumnType

Instance Method Details

#match?Boolean

Returns true if the supplied value is an integer, or false otherwise

Returns:

  • (Boolean)


7
8
9
# File 'lib/incsv/types/integer.rb', line 7

def match?
  value.strip.match(/\A[0-9]+\z/)
end