def to_h(values_only: false, with_values: false, with_errors: false)
      if values_only
        Hash[*options.flat_map {|opt| [opt.name, opt.type == 'group' ? opt.value.to_h(values_only: true) : opt.value]}]
      else
        Hash[*options.flat_map {|opt| [opt.name, opt.to_h(with_value: with_values, with_errors: with_errors).reject {|k,_| k==:name}]}]
      end
    end
def to_h(values_only: false, with_values: false, with_errors: false)
      if values_only
        Hash[*options.flat_map {|opt| [opt.name, opt.type == 'group' ? opt.value.to_h(values_only: true) : opt.value]}]
      else
        Hash[*options.flat_map {|opt| [opt.name, opt.to_h(with_value: with_values, with_errors: with_errors).reject {|k,_| k==:name}]}]
      end
    end
Convert a Group to a hash that has { option_name => option_value }
 @return [Hash]