class Inquirer::Client
- Inquirer::Client
- Reference
- Object
Overview
Contains many useful utilities & primitives for communicating with the Inquirer server/daemon.
Included Modules
Defined in:
inquirer/client.crConstructors
-
.new(config : Config)
Makes a client from the given Inquirer config.
Class Method Summary
-
.from(config : Config)
Makes a client from the given Inquirer config.
Instance Method Summary
-
#command(command : Command) : Response
Sends a request to execute a command.
-
#running!(exit = false)
Asserts the server is running.
-
#running? : Bool
Returns whether the server is running.
-
#send(request : Request) : Response
Sends raw request to the server.
Constructor Detail
Class Method Detail
Instance Method Detail
Sends a request to execute a command.
Assumes (and does not check) that the server is running.
Asserts the server is running.
Reports failure of that assertion using Console.exit
if exit is true, otherwise using Console.error
.
If assertion succeeded, returns self.
Returns whether the server is running.
Sends a Command::Ping
command and checks if the response
result is "pong"
. If it is, the Inquirer server this
client is connected to is indeed running.
Sends raw request to the server.
Raises InquirerError
if the server did not respond
properly (and the socket error if it did not repond
at all).