Sha256: 6c15f51206069339498e4eb42f4b3c10c06572b13ccf330ca3a96df241794f3d

Contents?: true

Size: 654 Bytes

Versions: 22

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

module LedgerSync
  module Ledgers
    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

22 entries across 22 versions & 1 rubygems

Version Path
ledger_sync-2.6.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.5.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.4.4 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.3.1 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.2.3 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.2.1 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.2.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.0.2 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.0.1 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.0.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-2.0.0.pre.1 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.8.1 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.8.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.7.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.6.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.4.4 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/mixins/infer_validation_contract_mixin.rb