Class: GroqRuby::Response
- Inherits:
-
Data
- Object
- Data
- GroqRuby::Response
- Defined in:
- lib/groq_ruby/response.rb
Overview
Value object representing a parsed HTTP response. The body is either a decoded JSON object (Hash/Array) or a raw String for binary responses.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body
4 5 6 |
# File 'lib/groq_ruby/response.rb', line 4 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers
4 5 6 |
# File 'lib/groq_ruby/response.rb', line 4 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status
4 5 6 |
# File 'lib/groq_ruby/response.rb', line 4 def status @status end |
Instance Method Details
#success? ⇒ Boolean
5 6 7 |
# File 'lib/groq_ruby/response.rb', line 5 def success? status.between?(200, 299) end |