struct Inquirer::Protocol::Response
- Inquirer::Protocol::Response
- Struct
- Value
- Object
Overview
Represents a response that carries a Status
plus an
optional result of some kind.
Included Modules
- JSON::Serializable
Defined in:
inquirer/protocol.crConstructors
- .new(pull : JSON::PullParser)
- .new(status : Inquirer::Protocol::Status, result : Array(String) | Hash(String, Array(String)) | String | Nil = nil)
Class Method Summary
-
.err(*args)
Makes an error response.
-
.ok(*args)
Makes an ok response.
Instance Method Summary
-
#result : RType | Nil
Returns the result.
-
#status : Status
Returns the status.
- #to_s(io)
Constructor Detail
def self.new(status : Inquirer::Protocol::Status, result : Array(String) | Hash(String, Array(String)) | String | Nil = nil)
#