You are viewing a single comment's thread. Return to all comments →
A more readable way.
arr_size = arr.size [:positive?, :negative?, :zero?].each do |action| p arr.count(&action).to_f/arr_size end
Plus Minus
You are viewing a single comment's thread. Return to all comments →
A more readable way.