Created
June 26, 2012 22:37
-
-
Save jwilger/2999792 to your computer and use it in GitHub Desktop.
I really wish I could do this in Ruby
This file contains 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
class X | |
def connect(action, to, with_success_status_code) | |
:result_a | |
end | |
def connect(different_thing_entirely) | |
:result_b | |
end | |
end | |
x = X.new | |
x.connect action: :create, to: CreateChangeRequest, with_success_status_code: 201 | |
#=> :result_a | |
x.connect different_thing_entirely: foo | |
#=> :result_b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And yes, I realize I'm asking for Smalltalk.