lib/yard/code_objects/root_object.rb in yard-0.6.3 vs lib/yard/code_objects/root_object.rb in yard-0.6.4
- old
+ new
@@ -1,11 +1,11 @@
module YARD
module CodeObjects
# Represents the root namespace object (the invisible Ruby module that
# holds all top level modules, class and other objects).
class RootObject < ModuleObject
- def path; "" end
- def inspect; "#<yardoc root>" end
+ def path; @path ||= "" end
+ def inspect; @inspect ||= "#<yardoc root>" end
def root?; true end
def equal?(other)
other == :root ? true : super(other)
end
\ No newline at end of file