Module: Familia::Features::Autoloadable

Included in:
SafeDump
Defined in:
lib/familia/features/autoloadable.rb

Overview

Enables automatic loading of feature-specific files when a feature is included in a user class.

When included in a feature module, adds ClassMethods that detect when the feature is included in user classes, derives the feature name, and autoloads files matching conventional patterns in the user class’s directory structure.

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(feature_module) ⇒ Object

Sets up a feature module with autoloading capabilities.

Extends the feature module with ClassMethods to handle post-inclusion autoloading.

Parameters:

  • feature_module (Module)

    the feature module being enhanced



20
21
22
# File 'lib/familia/features/autoloadable.rb', line 20

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