module SidekiqScheduler::Utils

def self.try_to_constantize(klass)

Returns:
  • (Class) - the class corresponding to the klass param

Parameters:
  • klass (String) -- The string to constantize
def self.try_to_constantize(klass)
  klass.is_a?(String) ? Object.const_get(klass) : klass
rescue NameError
  klass
end