Skip to content

Instantly share code, notes, and snippets.

@xcobar

xcobar/method.rb Secret

Last active March 19, 2019 16:50
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 xcobar/347d14e113cec605e1ca30a6f2b49e81 to your computer and use it in GitHub Desktop.
Save xcobar/347d14e113cec605e1ca30a6f2b49e81 to your computer and use it in GitHub Desktop.
def add_number(x, y)
raise 'x should be a number' unless x.is_a?(Integer)
raise 'y should be a number' unless y.is_a?(Integer)
x + y
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment