Skip to content

Instantly share code, notes, and snippets.

@tiagoefmoraes
Forked from barroso/method_escangalha_tudo.rb
Last active December 20, 2015 19:49
Show Gist options
  • Save tiagoefmoraes/6186350 to your computer and use it in GitHub Desktop.
Save tiagoefmoraes/6186350 to your computer and use it in GitHub Desktop.
[]#clear is bad
def escangalha_tudo obj, com_putaria=false
methods = obj.methods
#methods = obj.methods - Object.methods
methods.sort!
methods.each do |method|
clone = obj.clone
begin
puts "Method = #{method} => #{clone.send method}" unless !com_putaria and [:debugger, :breakpoint].include? method
rescue Exception => e
end
end
end
escangalha_tudo "babau", true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment