struct Inquirer::Protocol::Response

Overview

Represents a response that carries a Status plus an optional result of some kind.

Included Modules

Defined in:

inquirer/protocol.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(status : Inquirer::Protocol::Status, result : Array(String) | Hash(String, Array(String)) | String | Nil = nil) #

[View source]

Class Method Detail

def self.err(*args) #

Makes an error response.


[View source]
def self.ok(*args) #

Makes an ok response.


[View source]

Instance Method Detail

def result : RType | Nil #

Returns the result.


[View source]
def status : Status #

Returns the status.


[View source]
def to_s(io) #

[View source]