123456789_123456789_123456789_123456789_123456789_

Module: Mongo::Operation::PolymorphicLookup Private

Do not use. This module is for internal use only.

Overview

Shared behavior of looking up a class based on the name of the receiver’s class.

Instance Method Summary

Instance Method Details

#polymorphic_class(base, name) (private)

[ GitHub ]

  
# File 'lib/mongo/operation/shared/polymorphic_lookup.rb', line 28

def polymorphic_class(base, name)
  bits = (base + "::#{name}").split('::')
  bits.reduce(Object) do |cls, name|
    cls.const_get(name, false)
  end
end