lib/yard/code_objects/base.rb in yard-0.6.3 vs lib/yard/code_objects/base.rb in yard-0.6.4
- old
+ new
@@ -386,10 +386,10 @@
# @example The path of an instance method
# MethodObject.new(P("A::B"), :c).path # => "A::B#c"
# @return [String] the unique path of the object
# @see #sep
def path
- if parent && !parent.root?
+ @path ||= if parent && !parent.root?
[parent.path, name.to_s].join(sep)
else
name.to_s
end
end