Finish the method integer_ratios
:
Given an array of integers, the method should
calculate the ratios of its elements that are
positive, negative, and zero. For
example, if the integers are [1, 0, 2, -1], the
ratios of positive, negative and zero integers
should be 0.5, 0.25, and 0.25 respectively.
- The respective values should be rounded off to have a maximum of 4 decimal digits.
- Return the result as a hash with keys
:positive_ratio
, :positive_ratio
and :zero_ratio
.