Module: DSPy::Ext::StructDescriptions
- Defined in:
- lib/dspy/ext/struct_descriptions.rb
Overview
Extends T::Struct to support field descriptions via the :description kwarg.
This module is prepended to T::Struct to intercept const/prop definitions and capture descriptions before they reach Sorbet (which doesn’t support them).
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
24 25 26 |
# File 'lib/dspy/ext/struct_descriptions.rb', line 24 def self.prepended(base) base.singleton_class.prepend(ClassMethods) end |