Module: Foobara::Namespace::NamespaceHelpers::InstancesAreNamespaces

Includes:
Concern, IsNamespace
Defined in:
foobara-0.0.110/projects/namespace/src/namespace_helpers.rb

Instance Attribute Summary

Attributes included from Scoped

#foobara_manifest_reference, #scoped_namespace

Instance Method Summary collapse

Methods included from IsNamespace

#foobara_add_category, #foobara_add_category_for_instance_of, #foobara_add_category_for_subclass_of, #foobara_all, #foobara_categories, #foobara_category_symbol_for, #foobara_children, #foobara_depends_on_namespaces, #foobara_each, #foobara_lookup, #foobara_lookup!, #foobara_parent_namespace, #foobara_parent_namespace=, #foobara_register, #foobara_registered?, #foobara_registry, #foobara_root?, #foobara_root_namespace, #foobara_unregister, #method_missing, #respond_to_missing?, #scoped_clear_caches

Methods included from Scoped

#scoped_absolute_name, #scoped_category, #scoped_clear_caches, #scoped_full_name, #scoped_full_path, #scoped_ignore_module?, #scoped_ignore_modules=, #scoped_name, #scoped_name=, #scoped_path, #scoped_path=, #scoped_path_autoset=, #scoped_path_autoset?, #scoped_path_set?, #scoped_prefix, #scoped_short_name, #scoped_short_path

Methods included from Concern

foobara_class_methods_module_for, foobara_concern?, included

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Foobara::Namespace::IsNamespace

Instance Method Details

#initializeObject



74
75
76
77
78
79
80
81
82
83
84
85
# File 'foobara-0.0.110/projects/namespace/src/namespace_helpers.rb', line 74

def initialize(*, **, &)
  if Foobara::Util.super_method_takes_parameters?(self, InstancesAreNamespaces, __method__)
    # :nocov:
    super
    # :nocov:
  else
    super()
  end

  parent_namespace = scoped_namespace || self.class.scoped_default_namespace
  NamespaceHelpers.initialize_foobara_namespace(self, parent_namespace:)
end