Sha256: c123d11b616e7906c3ca4dfb787221b7ed055d95c1125e599480a2028a137f74
Contents?: true
Size: 767 Bytes
Versions: 15
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true require_relative 'infer_config_mixin' module LedgerSync module Ledgers module Mixins module InferResourceClassMixin module ClassMethods def inferred_resource_class @inferred_resource_class ||= begin base_module = inferred_config.base_module if name.include?('::Operations::') base_module.const_get(name.split('::Operations::').first) else base_module.const_get(name.split(base_module.name).last.split('::')[1]) end end end end def self.included(base) base.include InferConfigMixin base.extend ClassMethods end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems