Method: Inch::CodeObject::Provider::YARD::Object::Base#files

Defined in:
lib/inch/code_object/provider/yard/object/base.rb

#filesArray<CodeLocation>

Returns all files declaring the object in the form of an Array of Arrays containing the location of their declaration.

Returns:



85
86
87
88
89
90
91
92
93
# File 'lib/inch/code_object/provider/yard/object/base.rb', line 85

def files
  object.files.map do |(filename, line_no)|
    CodeLocation.new(base_dir, filename, line_no)
  end
rescue ::YARD::CodeObjects::ProxyMethodError
  # this error is raised by YARD
  # see broken.rb in test fixtures
  []
end