Class: Flon::Response

Inherits:
Struct
  • Object
show all
Defined in:
lib/flon/api.rb

Overview

Represents a response, with a status, body, and headers.

Instance Attribute Summary collapse

Instance Attribute Details

#body#to_json (readonly)

Returns the object to respond with that shall be #to_json’d.

Returns:

  • (#to_json)

    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)

#headersHash{String => #to_s} (readonly)

Returns the headers hash; each value will be converted with a String with #to_s.

Returns:

  • (Hash{String => #to_s})

    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)

#statusInteger (readonly)

Returns the status to use when responding.

Returns:

  • (Integer)

    the status to use when responding



70
# File 'lib/flon/api.rb', line 70

Response = Struct.new(:status, :body, :headers)