Sha256: 5a98106eb6b5a7362e3dcb8531611a64125c75156bc86209550c72db0379cc87
Contents?: true
Size: 463 Bytes
Versions: 35
Compression:
Stored size: 463 Bytes
Contents
begin require 'active_support/core_ext/string/inflections' rescue LoadError unless ''.respond_to?(:constantize) class String def constantize names = split('::') names.shift if names.empty? || names.first.empty? constant = Object names.each do |name| constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name) end constant end end end end
Version data entries
35 entries across 35 versions & 2 rubygems