Method: YARD::Server::LibraryVersion#load_yardoc_from_disk

Defined in:
lib/yard/server/library_version.rb

#load_yardoc_from_diskObject (protected)

Called when a library of source type “disk” is to be prepared. In this case, the #yardoc_file should already be set, but the library may not be prepared. Run preparation if not done.

Raises:

Since:

  • 0.6.0


206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/yard/server/library_version.rb', line 206

def load_yardoc_from_disk
  return if ready?

  @@chdir_mutex.synchronize do
    Dir.chdir(source_path_for_disk) do
      Thread.new do
        CLI::Yardoc.run('--no-stats', '-n', '-b', yardoc_file)
      end
    end
  end

  raise LibraryNotPreparedError
end