Class: Time

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

Class Method Summary collapse

Class Method Details

.importex_value(str) ⇒ Object



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