Some Ruby tips :
1) use literal array instead of ['test', 'test1']
ex : %w(test test1)
2) check with multiple values
ex: %w(val1 val2 val3).include?(check_val)
1) use literal array instead of ['test', 'test1']
ex : %w(test test1)
2) check with multiple values
ex: %w(val1 val2 val3).include?(check_val)
No comments:
Post a Comment