Skip to content

Instantly share code, notes, and snippets.

@enricostano
Last active August 29, 2015 13:56
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 enricostano/9135892 to your computer and use it in GitHub Desktop.
Save enricostano/9135892 to your computer and use it in GitHub Desktop.
def author(target)
case target
when User
do_this_to(target)
when Person
do_that_to(target)
else
raise ArgumentError
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment