Skip to content

Instantly share code, notes, and snippets.

@sivabudh
Created May 21, 2012 05:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sivabudh/2760616 to your computer and use it in GitHub Desktop.
Save sivabudh/2760616 to your computer and use it in GitHub Desktop.
Grandfather Clock Ruby solution
def clock(&block)
(Time.now.hour % 12 + 1).times do
block.call
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment