Method: YARD::CodeObjects::Proxy#path
- Defined in:
- lib/yard/code_objects/proxy.rb
#path ⇒ String Also known as: to_s, to_str
If the proxy resolves to an object, returns its path, otherwise guesses at the correct path using the original namespace and name.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/yard/code_objects/proxy.rb', line 89 def path if obj = to_obj obj.path else if @namespace.root? (@imethod ? ISEP : "") + name.to_s elsif @origname if @origname =~ /^[A-Z]/ @origname else [namespace.path, @origname].join end elsif name.to_s =~ /^[A-Z]/ # const name.to_s else # class meth? [namespace.path, name.to_s].join(CSEP) end end end |