Created
September 25, 2012 19:28
-
-
Save steve9001/3783926 to your computer and use it in GitHub Desktop.
This file contains 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
class Exception | |
def pretty | |
trace = backtrace.select{ |l|l.start_with?(Rails.root.to_s) }.join("\n ") | |
"#{self.class}\n#{message}\n#{trace}\n" | |
end | |
end |
Ah I get it. Yes you could I think. Personally I'm not always opposed to adding methods to an object, so e.pretty would be fine with me. I haven't used SImpleDelegator before though, that's useful.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right, or