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

Version Path
vj-sdk-0.6.5 lib/core_ext/object.rb
vj-sdk-0.6.4 lib/core_ext/object.rb
vj-sdk-0.6.3 lib/core_ext/object.rb
vj-sdk-0.6.1 lib/core_ext/object.rb
vj-sdk-0.6.0 lib/core_ext/object.rb
vj-sdk-0.5.6 lib/core_ext/object.rb
vj-sdk-0.5.5 lib/core_ext/object.rb
vj-sdk-0.5.4 lib/core_ext/object.rb
vj-sdk-0.5.3 lib/core_ext/object.rb
vj-sdk-0.5.2 lib/core_ext/object.rb
vj-sdk-0.5.1 lib/core_ext/object.rb
vj-sdk-0.5.0 lib/core_ext/object.rb
vj-sdk-0.4.3 lib/core_ext/object.rb
vj-sdk-0.4.2 lib/core_ext/object.rb
vj-sdk-0.4.1 lib/core_ext/object.rb
vj-sdk-0.4.0 lib/core_ext/object.rb
vj-sdk-0.2.1 lib/core_ext/object.rb