Class: DSPy::Signature::FieldDescriptor

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/dspy/signature.rb

Overview

Container for field type and description

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, description = nil, has_default = false) ⇒ FieldDescriptor

Returns a new instance of FieldDescriptor.



24
25
26
27
28
# File 'lib/dspy/signature.rb', line 24

def initialize(type, description = nil, has_default = false)
  @type = type
  @description = description
  @has_default = has_default
end

Instance Attribute Details

#descriptionObject (readonly)

Returns the value of attribute description.



18
19
20
# File 'lib/dspy/signature.rb', line 18

def description
  @description
end

#has_defaultObject (readonly)

Returns the value of attribute has_default.



21
22
23
# File 'lib/dspy/signature.rb', line 21

def has_default
  @has_default
end

#typeObject (readonly)

Returns the value of attribute type.



15
16
17
# File 'lib/dspy/signature.rb', line 15

def type
  @type
end