Skip to content

Instantly share code, notes, and snippets.

@jjb
Last active December 14, 2015 00:29
Show Gist options
  • Save jjb/4999418 to your computer and use it in GitHub Desktop.
Save jjb/4999418 to your computer and use it in GitHub Desktop.
def my_method(arg1, arg2)
unless Foo == arg1.class
raise ArgumentError,
"A Foo is expected for the first argument. An #{arg1.class} was given."
end
unless Bar == arg2.class
raise ArgumentError,
"A Bar is expected for the first argument. An #{arg2.class} was given."
end
puts "The method finished!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment