Skip to content

Instantly share code, notes, and snippets.

@jwilger
Created June 26, 2012 22:37
Show Gist options
  • Save jwilger/2999792 to your computer and use it in GitHub Desktop.
Save jwilger/2999792 to your computer and use it in GitHub Desktop.
I really wish I could do this in Ruby
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
@jwilger
Copy link
Author

jwilger commented Jun 26, 2012

And yes, I realize I'm asking for Smalltalk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment