Skip to content

Instantly share code, notes, and snippets.

@libbyschuknight
Forked from steveh/yardoc.rb
Created January 19, 2017 00:56
Show Gist options
  • Save libbyschuknight/b1d8cc47b705a594011743e250ccdc42 to your computer and use it in GitHub Desktop.
Save libbyschuknight/b1d8cc47b705a594011743e250ccdc42 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "pathname"
root = Pathname.new(".")
libs = root.children.select(&:directory?).collect(&:realpath)
libs.each do |lib|
Dir.chdir(lib.realpath.to_s) do
system "yard"
end
end
args = ["yard", "server", "-m"] + libs.collect(&:basename).collect(&:to_s).flat_map { |lib| [lib, "#{lib}/.yardoc"] }
exec args.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment