lib/sidekiq_fast_debounce/utils.rb
def const(klass)
        case klass
        when Class
          klass
        when String
          klass.split('::').reduce(Module, :const_get)
        else
          raise ArgumentError, "klass should be String or Class, it is `#{klass.class}`"
        end
      end
# Turn a string into a class
# @param klass [String, Class]
# @return [Class]
Turn a string into a class
Turn a string into a class
def const(klass)
        case klass
        when Class
          klass
        when String
          klass.split('::').reduce(Module, :const_get)
        else
          raise ArgumentError, "klass should be String or Class, it is `#{klass.class}`"
        end
      end
def const ( klass ) case klass when Class klass when String klass . split ( '::' ) . reduce ( Module , :const_get ) else raise ArgumentError , "klass should be String or Class, it is `#{klass.class}`" end end
Turn a string into a class
Turn a string into a class
None
Class
klass
None