Class: InCSV::Types::Integer
- Inherits:
-
ColumnType
- Object
- ColumnType
- InCSV::Types::Integer
- Defined in:
- lib/incsv/types/integer.rb
Overview
Represents a whole integer
Instance Method Summary collapse
-
#match? ⇒ Boolean
Returns true if the supplied value is an integer, or false otherwise.
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
7 8 9 |
# File 'lib/incsv/types/integer.rb', line 7 def match? value.strip.match(/\A[0-9]+\z/) end |