Hacking, Talking, Eating
Join or login to comment.
Just learned that Proc.new will take the block passed into the method where you call it. So we could do this:
def foo(callable = nil) (callable || Proc.new).call(42)end
Might be a bit too clever, though.
0 · February 19, 2014
We went to Martollis, be right back.
0 · February 18, 2014
running late will be there by 7pm
Next: Invite friends
Help support your Meetup
Sponsors food and drinks for events and also pays the meetup.com dues
Meetup members, Log in