Last active
December 14, 2015 00:29
-
-
Save jjb/4999418 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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