Method: YARD::Server::LibraryVersion#gemspec

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

#gemspecGem::Specification?

Returns:

  • (Gem::Specification)

    a gemspec object for a given library. Used for :gem source types.

  • (nil)

    if there is no installed gem for the library

Since:

  • 0.6.0



191
192
193
194
# File 'lib/yard/server/library_version.rb', line 191

def gemspec
  ver = version ? "= #{version}" : ">= 0"
  YARD::GemIndex.find_all_by_name(name, ver).last
end