Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created December 19, 2015 01:10
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 tenderlove/7e0fb0deea591aecd283 to your computer and use it in GitHub Desktop.
Save tenderlove/7e0fb0deea591aecd283 to your computer and use it in GitHub Desktop.
class A
def foo; end
end
class B
def foo; end
end
def omg obj
obj.foo # `obj` is only ever two types: A and B
end
omg A.new
omg B.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment