Skip to content

Instantly share code, notes, and snippets.

@barroso
Created June 13, 2013 20:39
Show Gist options
  • Save barroso/5777142 to your computer and use it in GitHub Desktop.
Save barroso/5777142 to your computer and use it in GitHub Desktop.
run all methods with no params on any ruby object
def escangalha_tudo obj, com_putaria=false
methods = obj.methods
#methods = obj.methods - Object.methods
methods.sort!
methods.each do |method|
begin
puts "Method = #{method} => #{obj.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