Wrap text
Report abuse
Shoes api scraper
|
|
matches = `grep rb_define_method shoes/*`
hash = Hash.new { |h, k| h[k] = [] }
internal_methods = %w( draw )
matches.each do |match|
klass, method = match.scan(/\((.+), "(.+)",/).first
next if klass.nil? || method.nil? || internal_methods.include?(method)
hash[klass] << method
end
hash.to_a.sort_by { |a| a.first }.each do |klass, methods|
puts klass
methods.sort.each do |method|
puts " #{method}"
end
end
|