Sha256: 9f51972c61380a7f87dd1b7689cc9491d022ccad0c5995c112916c6102d61ff6
Contents?: true
Size: 484 Bytes
Versions: 18
Compression:
Stored size: 484 Bytes
Contents
# frozen_string_literal: true module LedgerSync module Serialization module Type class SerializerType < LedgerSync::Type::Value attr_reader :serializer def initialize(args = {}) @serializer = args.fetch(:serializer) super() end def cast_value(args = {}) value = args.fetch(:value) return if value.nil? serializer.new.serialize(resource: value) end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems