Class: UkrsibAPI::BaseTransformer

Inherits:
Dry::Transformer::Pipe
  • Object
show all
Defined in:
lib/ukrsib_api/base_transformer.rb

Overview

transformer methods here

Class Method Summary collapse

Class Method Details

.build_pipeline(mapping) ⇒ Object

Build a transformation pipeline given a mapping



10
11
12
13
14
15
16
17
# File 'lib/ukrsib_api/base_transformer.rb', line 10

def self.build_pipeline(mapping)
  define! do
    map_array do
      rename_keys(mapping)
      symbolize_keys
    end
  end
end