Skip to content

Instantly share code, notes, and snippets.

@epitron
Created January 19, 2013 01:37
Show Gist options
  • Save epitron/4570134 to your computer and use it in GitHub Desktop.
Save epitron/4570134 to your computer and use it in GitHub Desktop.
Magic block-taking require method.
[08:35 PM] epi@yew :: ~/code/pry $ pry
Loading gems...
|_ epitools
|_ coderay
|_ awesome_print
|_ print_members
[1] pry(main)> whee!
def req(mod)
puts " |_ #{mod}"
require mod
yield if block_given?
rescue Exception => e
p e
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment