Module: Cattri::Introspection

Defined in:
lib/cattri/introspection.rb

Overview

Provides a read-only interface for inspecting attributes defined via the Cattri DSL.

When included, adds class-level methods to:

  • Check if an attribute is defined

  • Retrieve attribute definitions

  • List defined attribute methods

  • Trace the origin of an attribute

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ void

This method returns an undefined value.

Parameters:

  • base (Class, Module)

    the target that includes ‘Cattri`



14
15
16
# File 'lib/cattri/introspection.rb', line 14

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