Sha256: b197d4e7473bb645574c905d79f1ffc9960cfd96b071a54764edd532b48606ca
Contents?: true
Size: 822 Bytes
Versions: 1
Compression:
Stored size: 822 Bytes
Contents
# frozen_string_literal: true module LedgerSync module Adaptors module Mixins module InferLedgerSerializerMixin module ClassMethods def inferred_ledger_serializer(resource:) inferred_ledger_serializer_class.new( resource: resource ) end def inferred_ledger_serializer_class @inferred_ledger_serializer_class ||= begin inferred_adaptor_class.base_module.const_get( "#{inferred_resource_class.resource_module_str}::LedgerSerializer" ) end end end def self.included(base) base.include InferAdaptorClassMixin base.include InferResourceClassMixin base.extend ClassMethods end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ledger_sync-1.3.2 | lib/ledger_sync/adaptors/mixins/infer_ledger_serializer_mixin.rb |