Skip to content

Instantly share code, notes, and snippets.

@VelizarHristov
Created July 30, 2016 17:47
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 VelizarHristov/2785c4e15c11db1dcd0a4f0a4b95a4ee to your computer and use it in GitHub Desktop.
Save VelizarHristov/2785c4e15c11db1dcd0a4f0a4b95a4ee to your computer and use it in GitHub Desktop.
def reorder(order)
expected_len = trip_items.length - 1
actual_len = order.length
if expected_len != actual_len
raise ArgumentError.new("Received order of length #{actual_len}, expected #{expected_len}")
end
# more code goes here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment