Class: Flon::Response
- Inherits:
-
Struct
- Object
- Struct
- Flon::Response
- Defined in:
- lib/flon/api.rb
Overview
Represents a response, with a status, body, and headers.
Instance Attribute Summary collapse
-
#body ⇒ #to_json
readonly
The object to respond with that shall be #to_json’d.
-
#headers ⇒ Hash{String => #to_s}
readonly
The headers hash; each value will be converted with a String with #to_s.
-
#status ⇒ Integer
readonly
The status to use when responding.
Instance Attribute Details
#body ⇒ #to_json (readonly)
Returns the object to respond with that shall be #to_json’d.
70 |
# File 'lib/flon/api.rb', line 70 Response = Struct.new(:status, :body, :headers) |
#headers ⇒ Hash{String => #to_s} (readonly)
Returns the headers hash; each value will be converted with a String with #to_s.
70 |
# File 'lib/flon/api.rb', line 70 Response = Struct.new(:status, :body, :headers) |
#status ⇒ Integer (readonly)
Returns the status to use when responding.
70 |
# File 'lib/flon/api.rb', line 70 Response = Struct.new(:status, :body, :headers) |