Last active
August 29, 2015 14:20
-
-
Save nekova/3ec3bff6328c27bc08f8 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
user0 = {"name" => "nekova"} | |
user1 = {"name" => "adam"} | |
users = user0.foo(user1) | |
#=> [{"name" => "nekova"}, {"name" => "adam"}] | |
user2 = {"name" => "eve"} | |
users.foo(user2) | |
#=> [{"name" => "nekova"}, {"name" => "adam"}, {"name" => "eve"}] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
型みてから適当に振り分けるメソッド書くしかないですかね〜ヤダな〜