Last active
July 21, 2016 20:09
-
-
Save ellismarte/f3928fd60f49b09158debae88b70d220 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
def publish_for_retry(message, last_resort) | |
if message["retry_count_not_exceeded"] | |
puts publish(message["body"]) | |
else | |
puts send(last_resort, message["body"]) | |
end | |
end | |
def publish(message) | |
message | |
end | |
def say(something) | |
something + "last_resort" | |
end | |
publish_for_retry({"retry_count_not_exceeded" => 1 > 2, "body" => "snakes"}, :say) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment