Class: Legion::Extensions::Llm::ErrorMiddleware::ResponseWithBody
- Inherits:
-
Struct
- Object
- Struct
- Legion::Extensions::Llm::ErrorMiddleware::ResponseWithBody
show all
- Defined in:
- lib/legion/extensions/llm/error.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name) ⇒ Object
157
158
159
160
161
|
# File 'lib/legion/extensions/llm/error.rb', line 157
def method_missing(method_name, ...)
return response.public_send(method_name, ...) if response.respond_to?(method_name)
super
end
|
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
150
151
152
|
# File 'lib/legion/extensions/llm/error.rb', line 150
def body
@body
end
|
#response ⇒ Object
Returns the value of attribute response
150
151
152
|
# File 'lib/legion/extensions/llm/error.rb', line 150
def response
@response
end
|
Instance Method Details
#[](key) ⇒ Object
153
154
155
|
# File 'lib/legion/extensions/llm/error.rb', line 153
def [](key)
response[key] if response.respond_to?(:[])
end
|
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
163
164
165
|
# File 'lib/legion/extensions/llm/error.rb', line 163
def respond_to_missing?(method_name, include_private = false)
response.respond_to?(method_name, include_private) || super
end
|
#status ⇒ Object
151
|
# File 'lib/legion/extensions/llm/error.rb', line 151
def status = response.status
|