Ruby’s Array#sample
method can take an unnamed argument to return more than one random element.
%w[a b c].sample(2)
=> ["a", "c"]
Ruby’s Array#sample
method can take an unnamed argument to return more than one random element.
%w[a b c].sample(2)
=> ["a", "c"]