Skip to content

Instantly share code, notes, and snippets.

@bkimble
Created November 3, 2011 18:34
Show Gist options
  • Save bkimble/1337317 to your computer and use it in GitHub Desktop.
Save bkimble/1337317 to your computer and use it in GitHub Desktop.
def a; nil; end; def b; 'wee'; end;
c = [:a,:b].map{|m| send(m)}
@bmarini
Copy link

bmarini commented Nov 3, 2011

c = [:a, :b, :c].detect { |m| send(m) }

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