Created
January 19, 2013 01:37
-
-
Save epitron/4570134 to your computer and use it in GitHub Desktop.
Magic block-taking require method.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[08:35 PM] epi@yew :: ~/code/pry $ pry | |
Loading gems... | |
|_ epitools | |
|_ coderay | |
|_ awesome_print | |
|_ print_members | |
[1] pry(main)> whee! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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