Class: DSPy::Signature::FieldDescriptor
- Inherits:
-
Object
- Object
- DSPy::Signature::FieldDescriptor
- Extended by:
- T::Sig
- Defined in:
- lib/dspy/signature.rb
Overview
Container for field type and description
Instance Attribute Summary collapse
-
#default_value ⇒ Object
readonly
Returns the value of attribute default_value.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#has_default ⇒ Object
readonly
Returns the value of attribute has_default.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, description = nil, has_default = false, default_value = nil) ⇒ FieldDescriptor
constructor
A new instance of FieldDescriptor.
Constructor Details
#initialize(type, description = nil, has_default = false, default_value = nil) ⇒ FieldDescriptor
Returns a new instance of FieldDescriptor.
27 28 29 30 31 32 |
# File 'lib/dspy/signature.rb', line 27 def initialize(type, description = nil, has_default = false, default_value = nil) @type = type @description = description @has_default = has_default @default_value = default_value end |
Instance Attribute Details
#default_value ⇒ Object (readonly)
Returns the value of attribute default_value.
24 25 26 |
# File 'lib/dspy/signature.rb', line 24 def default_value @default_value end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
18 19 20 |
# File 'lib/dspy/signature.rb', line 18 def description @description end |
#has_default ⇒ Object (readonly)
Returns the value of attribute has_default.
21 22 23 |
# File 'lib/dspy/signature.rb', line 21 def has_default @has_default end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
15 16 17 |
# File 'lib/dspy/signature.rb', line 15 def type @type end |