Sha256: d05109ac72f7948b45a490c50d9cdb7256143925484304768d95e9150c17105e

Contents?: true

Size: 448 Bytes

Versions: 3

Compression:

Stored size: 448 Bytes

Contents

module RSpec
  module Parameterized
    module ExampleHelperMethods
      def recursive_apply(val)
        return val.apply(self) if HelperMethods.applicable?(val)

        if val.is_a?(Array)
          return val.map { |child_val| recursive_apply(child_val) }
        end

        if val.is_a?(Hash)
          return val.map { |key, value| [recursive_apply(key), recursive_apply(value)] }.to_h
        end

        val
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rspec-parameterized-0.5.3 lib/rspec/parameterized/example_helper_methods.rb
rspec-parameterized-0.5.2 lib/rspec/parameterized/example_helper_methods.rb
rspec-parameterized-0.5.1 lib/rspec/parameterized/example_helper_methods.rb