Method: YARD::CodeObjects::Base#file

Defined in:
lib/yard/code_objects/base.rb

#fileString?

Returns the filename the object was first parsed at, taking definitions with docstrings first.

Returns:

  • (String)

    a filename

  • (nil)

    if there is no file associated with the object

[View source]

307
308
309
# File 'lib/yard/code_objects/base.rb', line 307

def file
  @files.first ? @files.first[0] : nil
end