Class: Time

Inherits:
Object
  • Object
show all
Defined in:
lib/importex/ruby_additions.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) importex_value(str)



32
33
34
35
36
# File 'lib/importex/ruby_additions.rb', line 32

def self.importex_value(str)
  Time.parse(str) unless str.blank?
rescue ArgumentError
  raise Importex::InvalidCell, "Not a time."
end