Sha256: 7d977bc0c860510802bc823b3a7f8aee7282d877e571e8806797850d84444ba3
Contents?: true
Size: 854 Bytes
Versions: 1
Compression:
Stored size: 854 Bytes
Contents
# frozen_string_literal: true module LedgerSync module Adaptors module Mixins module InferLedgerSerializerMixin module ClassMethods def inferred_ledger_serializer(resource:) @inferred_ledger_serializer ||= 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.1 | lib/ledger_sync/adaptors/mixins/infer_ledger_serializer_mixin.rb |