Class: RailsAiContext::SchemaHint
- Inherits:
-
Data
- Object
- Data
- RailsAiContext::SchemaHint
- Defined in:
- lib/rails_ai_context/schema_hint.rb
Overview
Structured hydration payload representing a model’s ground truth. Used by hydrators to inject cross-tool context into controller and view tool responses. Immutable value object via Data.define.
Instance Attribute Summary collapse
-
#associations ⇒ Object
readonly
Returns the value of attribute associations.
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#confidence ⇒ Object
readonly
Returns the value of attribute confidence.
-
#model_name ⇒ Object
readonly
Returns the value of attribute model_name.
-
#primary_key ⇒ Object
readonly
Returns the value of attribute primary_key.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
-
#validations ⇒ Object
readonly
Returns the value of attribute validations.
Instance Method Summary collapse
Instance Attribute Details
#associations ⇒ Object (readonly)
Returns the value of attribute associations
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def associations @associations end |
#columns ⇒ Object (readonly)
Returns the value of attribute columns
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def columns @columns end |
#confidence ⇒ Object (readonly)
Returns the value of attribute confidence
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def confidence @confidence end |
#model_name ⇒ Object (readonly)
Returns the value of attribute model_name
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def model_name @model_name end |
#primary_key ⇒ Object (readonly)
Returns the value of attribute primary_key
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def primary_key @primary_key end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def table_name @table_name end |
#validations ⇒ Object (readonly)
Returns the value of attribute validations
7 8 9 |
# File 'lib/rails_ai_context/schema_hint.rb', line 7 def validations @validations end |
Instance Method Details
#association_names ⇒ Object
24 25 26 |
# File 'lib/rails_ai_context/schema_hint.rb', line 24 def association_names associations.map { |a| a[:name] } end |
#column_names ⇒ Object
20 21 22 |
# File 'lib/rails_ai_context/schema_hint.rb', line 20 def column_names columns.map { |c| c[:name] } end |
#verified? ⇒ Boolean
16 17 18 |
# File 'lib/rails_ai_context/schema_hint.rb', line 16 def verified? confidence == "[VERIFIED]" end |