Sha256: 2ce2b53796da16047487b74c12e682116ca719460d18277981d72652aae331ac

Contents?: true

Size: 517 Bytes

Versions: 1

Compression:

Stored size: 517 Bytes

Contents

# coding: utf-8
# frozen_string_literal: true

module MicroRb
  module Clients
    class Rpc
      include Base

      base_uri MicroRb::Configuration.instance.api_uri

      def self.call(service:, method:, params:, klass_response: nil)
        response = post(MicroRb::Configuration.instance.api_rpc,
                        options(service: service, method: method, request: params))

        return klass_response.new(response.to_h.symbolize_keys!) if klass_response

        response
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
micro-rb-0.1.0.rc3 lib/micro/clients/rpc.rb