Module: Foobara::Namespace::NamespaceHelpers::AutoRegisterInstances

Includes:
Concern
Defined in:
foobara-0.7.3/projects/typesystem/projects/namespace/src/namespace_helpers.rb

Instance Method Summary collapse

Methods included from Concern

foobara_class_methods_module_for, foobara_concern?, included

Instance Method Details

#initialize ⇒ Object



59
60
61
62
63
64
65
66
67
68
69
70
# File 'projects/typesystem/projects/namespace/src/namespace_helpers.rb', line 59

def initialize(*, **, &)
  if Foobara::Util.super_method_takes_parameters?(self, AutoRegisterInstances, __method__)
    super
  else
    # simplecov:disable
    super()
    # simplecov:enable
  end

  ns = scoped_namespace || self.class.scoped_default_namespace
  ns&.foobara_register(self)
end