Created
July 15, 2016 05:35
-
-
Save radar/1ce7ca34308e8d54b0d5670325b6fa07 to your computer and use it in GitHub Desktop.
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
objects = [{ amount: 100 }, { amount: 100 }, { amount: 100 }] | |
expected_amount = objects.first[:amount] | |
objects.all? { |o| o[:amount] == expected_amount } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment