I suggest:

    rule_values = [rule_values] unless rule_values.is_a?(Array)