Skip to content

Instantly share code, notes, and snippets.

@simeji
Forked from henry0312/make_ruby_dict.rb
Created April 8, 2014 04:33
Show Gist options
  • Save simeji/10091162 to your computer and use it in GitHub Desktop.
Save simeji/10091162 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