Sha256: 795e6bb45d1080e02d20559aa1b8743addd9edb5055176255b1b90d1e2b4b583

Contents?: true

Size: 655 Bytes

Versions: 3

Compression:

Stored size: 655 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  module Adaptors
    module Mixins
      module InferValidationContractMixin
        module ClassMethods
          def inferred_validation_contract_class
            @inferred_validation_contract_class ||= begin
              const_get(
                inferred_validation_contract_class_name
              )
            end
          end

          def inferred_validation_contract_class_name
            @inferred_validation_contract_class_name ||= "#{name}::Contract"
          end
        end

        def self.included(base)
          base.extend ClassMethods
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.3.5 lib/ledger_sync/adaptors/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.3.4 lib/ledger_sync/adaptors/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.3.3 lib/ledger_sync/adaptors/mixins/infer_validation_contract_mixin.rb