Class: CSVImportable::TypeParser::IntegerTypeParser

Inherits:
CSVImportable::TypeParser show all
Defined in:
lib/csv_importable/type_parser/integer_type_parser.rb

Instance Attribute Summary

Attributes inherited from CSVImportable::TypeParser

#key, #required, #row, #value

Instance Method Summary collapse

Methods inherited from CSVImportable::TypeParser

#initialize, #parse

Constructor Details

This class inherits a constructor from CSVImportable::TypeParser

Instance Method Details

#error_messageObject



7
8
9
# File 'lib/csv_importable/type_parser/integer_type_parser.rb', line 7

def error_message
  "Invalid integer for column: #{key}"
end

#parse_valObject



3
4
5
# File 'lib/csv_importable/type_parser/integer_type_parser.rb', line 3

def parse_val
  Integer(value)
end