Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/importex/ruby_additions.rb
Class Method Summary (collapse)
Class Method Details
+ (Object) importex_value(str)
2 3 4 5 6 7 8 9 10 |
# File 'lib/importex/ruby_additions.rb', line 2 def self.importex_value(str) unless str.blank? if str =~ /^[.\d]+$/ str.to_i else raise Importex::InvalidCell, "Not a number." end end end |