Skip to content

Instantly share code, notes, and snippets.

@Blue-Dog-Archolite
Created October 12, 2011 19:49
Show Gist options
  • Save Blue-Dog-Archolite/1282319 to your computer and use it in GitHub Desktop.
Save Blue-Dog-Archolite/1282319 to your computer and use it in GitHub Desktop.
Not smart enough to understand
def rapid_reply(opts = {})
require_per_hour = opts[:require_per_hour] ||= true
force_reconstruction = opts[:force_reconstruction] ||= false
opts[:commit] ||= true #always sets the value of opts[:commit] to true regardless if passed in.
opts[:commit] = true if opts[:commit].nil? #this line works as expected
end
#when calling
rapid_reply(:commit => false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment