Class: Evil::Client::Operation

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer::Mixin
Defined in:
lib/evil/client/operation.rb,
lib/evil/client/operation/request.rb,
lib/evil/client/operation/response.rb,
lib/evil/client/operation/response_error.rb,
lib/evil/client/operation/unexpected_response_error.rb

Overview

Carries a final schema for a single operation along with shared connection, and uses it to send requests to the server

Defined Under Namespace

Classes: Request, Response, ResponseError, UnexpectedResponseError

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ Object

Builds and sends a request and returns a response proccessed by schema

Parameters:

  • file (IO, nil)
  • options (Hash<Symbol, Object>)

Returns:

  • (Object)


18
19
20
21
22
# File 'lib/evil/client/operation.rb', line 18

def call(**options)
  req   = request.build(options)
  array = connection.call(req)
  response.handle(array)
end