Skip to content

Instantly share code, notes, and snippets.

@henry0312
Created August 24, 2013 12:39
Show Gist options
  • Save henry0312/6327891 to your computer and use it in GitHub Desktop.
Save henry0312/6327891 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'uri'
if ARGV.size != 1
warn "Invalid argument"
exit
end
methods = []
Dir.glob(File.expand_path(ARGV[0]) + "/**/*.ri").each do |file|
method = URI.decode(File.basename(file))
if /^(.*)-\w*\.ri$/ =~ method
methods << $1
else
warn file
end
end
methods.uniq!.sort.each do |method|
puts method
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment