Created
February 2, 2015 11:05
-
-
Save sue445/23685d89bb915f4ff78b to your computer and use it in GitHub Desktop.
rubicureでプリキュアの色の多い順に調べるワンライナー(ゴプリキュア対応版)
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
require "rubicure" | |
Precure.all_stars.group_by{ |girl| girl.color }.map{ |color, girls| [color, girls.count] }.sort_by{ |color, girl_count| girl_count }.reverse | |
# => [["pink", 9], ["yellow", 8], ["blue", 7], ["purple", 4], ["red", 4], ["white", 3], ["green", 2], ["black", 1]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment