lib/docrb/lib/docrb/resolvable.rb
def resolve(name)
      return nil if name.nil?

      name = name.to_sym

      # module?
      if (mod = try?(:modules)&.find(&by_name(name)))
        return mod
      end

      # class?
      if (cls = try?(:classes)&.find(&by_name(name)))
        return cls
      end

      # method?
      if (met = resolve_method(name))
        return met
      end

      # attribute?
      if (att = try?(:attributes)&.find(&by_name(name)))
        return att
      end

      if (obj = @parent&.resolve(name))
        return obj
      end

      nil
    end
# Resolves a provided name in the current containter's context. This method
# will attempt to return an object matching the provided name by looking for
# it in the following subcontainers: modules, classes, methods, attributes,
# and recursively performing the resolution on the container's parent, if
# any.
#
# name - Name of the object being resolved
#
# Returns the first object found by the provided name, or nil, in case none
# is found.
Resolves a provided name in the current containter's context. This method
will attempt to return an object matching the provided name by looking for
it in the following subcontainers: modules, classes, methods, attributes,
and recursively performing the resolution on the container's parent, if
any.

Name of the object being resolved

Returns the first object found by the provided name, or nil, in case none
is found.
Resolves a provided name in the current containter ' s context . This method will attempt to return an object matching the provided name by looking for it in the following subcontainers : modules classes methods attributes and recursively performing the resolution on the container ' s parent if any . Name of the object being resolved Returns the first object found by the provided name or nil in case none is found .
def resolve(name)
      return nil if name.nil?
      name = name.to_sym
      if (mod = try?(:modules)&.find(&by_name(name)))
        return mod
      end
      if (cls = try?(:classes)&.find(&by_name(name)))
        return cls
      end
      if (met = resolve_method(name))
        return met
      end
      if (att = try?(:attributes)&.find(&by_name(name)))
        return att
      end
      if (obj = @parent&.resolve(name))
        return obj
      end
      nil
    end
def resolve ( name ) return nil if name . nil? name = name . to_sym if ( mod = try? ( :modules ) &. find ( & by_name ( name ) ) ) return mod end if ( cls = try? ( :classes ) &. find ( & by_name ( name ) ) ) return cls end if ( met = resolve_method ( name ) ) return met end if ( att = try? ( :attributes ) &. find ( & by_name ( name ) ) ) return att end if ( obj = @parent &. resolve ( name ) ) return obj end nil end
Resolves a provided name in the current containter's context.
Resolves a provided name in the current containter ' s context .
# module? # class? # method? # attribute?
name