Welcome to mirror list, hosted at ThFree Co, Russian Federation.

underscorify_keys_transformer.rb « transformers « common « bulk_imports « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b32ab28fdbb54b650da9421e1fd404ee4c7fbe1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module BulkImports
  module Common
    module Transformers
      class UnderscorifyKeysTransformer
        def initialize(options = {})
          @options = options
        end

        def transform(_, data)
          data.deep_transform_keys do |key|
            key.to_s.underscore
          end
        end
      end
    end
  end
end