class Time
Public Class Methods
safely_parse(val)
click to toggle source
Will return nil if val
is nil or a blank string. Otherwise, will parse as normal using Time.parse
# File lib/rubyfocus/core_ext.rb, line 4 def self.safely_parse(val) if val.nil? || val == "" nil else parse(val) end end