Sha256: 30f70089736ca6bffa9d37634d56e0bf04df21240ddb8f99a3156473c396aa2f
Contents?: true
Size: 614 Bytes
Versions: 8
Compression:
Stored size: 614 Bytes
Contents
# frozen_string_literal: true module BingAdsRubySdk module Postprocessors class CastLongArrays def initialize(params) @params = params end def call process(@params) end private def process(obj) return unless obj.is_a?(Hash) obj.each do |k, v| case v when Hash if v[:long].is_a?(Array) obj[k] = v[:long].map(&:to_i) else process(v) end when Array v.each {|elt| process(elt) } end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems