Ampersand method

800 views

Published on

How to do enumerables on methods that take a single parameter more easily.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
800
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ampersand method

  1. 1. map(&method(:method_name)) <ul><li>[“42”, “99”].map(&method(:Integer)) </li></ul>

×