Skip to content

Instantly share code, notes, and snippets.

@dreamr
Last active December 25, 2015 19:29
Show Gist options
  • Save dreamr/7028011 to your computer and use it in GitHub Desktop.
Save dreamr/7028011 to your computer and use it in GitHub Desktop.
I was showing method chaining to someone, @jgarcia I think
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