我基本上是在寻找一种更漂亮的方式来写:
do_something() if my_string == 'first' | my_string == 'second' | my_string == 'third'
有任何想法吗?
ruby
ruby ×1