I can create a array of strings by %w(foo bar)
.
Is there similar way to create a array of symbols?
Just do as below :
%i(foo bar)
It is available since Ruby2.0.0.
Check out the their official News
Added
%i
and%I
for symbol list creation (similar to %w and %W).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With