Last active
December 25, 2015 19:29
-
-
Save dreamr/7028011 to your computer and use it in GitHub Desktop.
I was showing method chaining to someone, @jgarcia I think
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
reporter = Reporting::Reporter.new | |
def do_shit | |
reporter.add_msg_line "Starting do shit" | |
rescue Exception => e | |
reporter.add_msg_line "There was an error! #{e.message}" | |
ensure | |
reporter.send_event("do Shit") | |
end | |
def something | |
reporter.add_msg_line "Some shit happened here" | |
end | |
def something_else | |
reporter.add_msg_line "Something else happened here" | |
end | |
def and_another | |
reporter.add_msg_line "And another 'log line'" | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment