module GlobalID::Locator

def locate(gid, options = {})

modules match, +nil+ is returned.
instances of returned classes to those including that module. If no classes or
classes to those classes or their subclasses. Passing one or more modules in limits
allowed to be located. Passing one or more classes limits instances of returned
* :only - A class, module or Array of classes and/or modules that are
Options:

Takes either a GlobalID or a string that can be turned into a GlobalID
def locate(gid, options = {})
  if gid = GlobalID.parse(gid)
    locator_for(gid).locate gid if find_allowed?(gid.model_class, options[:only])
  end
end