Sha256: ba0f285ec54d54768724c265781567d1ac88a0b6bf5b214e1cd11cb05db9f077
Contents?: true
Size: 431 Bytes
Versions: 37
Compression:
Stored size: 431 Bytes
Contents
class Object # Cribbed from DataMapper's Extlib library. def full_const_get(name) list = name.split("::") list.shift if list.first.blank? obj = self list.each do |x| # This is required because const_get tries to look for constants in the # ancestor chain, but we only want constants that are HERE obj = obj.const_defined?(x) ? obj.const_get(x) : obj.const_missing(x) end obj end end
Version data entries
37 entries across 37 versions & 2 rubygems