Sha256: c42e56e4431e702e87bcd61c68df700446eadd7ba0d9aeeb5dab5f1ab9a5927a
Contents?: true
Size: 578 Bytes
Versions: 10
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true module LunaPark module Mappers class Codirectional < Simple module Copyists # Copyist for copiyng value between two schemas with SAME and PLAIN paths class Slice def initialize @keys = [] end def add_key(key) @keys << key end def from_row(row:, attrs:) attrs.merge! row.slice(*@keys) end def to_row(row:, attrs:) row.merge! attrs.slice(*@keys) end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems