Class | YARD::CodeObjects::Proxy |
In: |
lib/yard/code_objects/proxy.rb
|
Parent: | Object |
The Proxy class is a way to lazily resolve code objects in cases where the object may not yet exist. A proxy simply stores an unresolved path until a method is called on the object, at which point it does a lookup using {Registry.resolve}. If the object is not found, a warning is raised and {ProxyMethodError} might be raised.
@example Creates a Proxy to the String class from a module
# When the String class is parsed this method will # begin to act like the String ClassObject. Proxy.new(mymoduleobj, "String")
@see Registry.resolve @see ProxyMethodError
namespace | -> | parent |
namespace | [R] |
@raise [ArgumentError] if namespace is not a NamespaceObject @return [Proxy] self
Dispatches the method to the resolved object.
@raise [ProxyMethodError] if the proxy cannot find the real object