diff --git a/lib/yard/code_objects/base.rb b/lib/yard/code_objects/base.rb index 27b37e549..fed0957d3 100644 --- a/lib/yard/code_objects/base.rb +++ b/lib/yard/code_objects/base.rb @@ -303,6 +303,7 @@ def add_file(file, line = nil, has_comments = false) # definitions with docstrings first. # # @return [String] a filename + # @return [nil] if there is no file associated with the object def file @files.first ? @files.first[0] : nil end