Sha256: 3a9abc4e1d398f3359e6e0ef3c95b12af02fdff495714fef10e85f1ca5f6c80b

Contents?: true

Size: 392 Bytes

Versions: 18

Compression:

Stored size: 392 Bytes

Contents

module PipeRpc
  class Request
    def initialize(args)
      @server = args.fetch(:server, :default).to_sym
      @method = args.fetch(:method).to_sym
      @arguments = args.fetch(:arguments, [])
      @id = args.fetch(:id, nil)
    end

    attr_reader :server, :method, :arguments, :id

    def to_h
      { server: server, method: method, arguments: arguments, id: id }
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pipe_rpc-2.5.0 lib/pipe_rpc/request.rb
pipe_rpc-2.4.0 lib/pipe_rpc/request.rb
pipe_rpc-2.3.0 lib/pipe_rpc/request.rb
pipe_rpc-2.2.3 lib/pipe_rpc/request.rb
pipe_rpc-2.2.2 lib/pipe_rpc/request.rb
pipe_rpc-2.2.1 lib/pipe_rpc/request.rb
pipe_rpc-2.2.0 lib/pipe_rpc/request.rb
pipe_rpc-2.1.0 lib/pipe_rpc/request.rb
pipe_rpc-2.0.0 lib/pipe_rpc/request.rb
pipe_rpc-1.1.2 lib/pipe_rpc/request.rb
pipe_rpc-1.1.1 lib/pipe_rpc/request.rb
pipe_rpc-1.1.0 lib/pipe_rpc/request.rb
pipe_rpc-1.0.0 lib/pipe_rpc/request.rb
pipe_rpc-0.3.2 lib/pipe_rpc/request.rb
pipe_rpc-0.3.1 lib/pipe_rpc/request.rb
pipe_rpc-0.3.0 lib/pipe_rpc/request.rb
pipe_rpc-0.2.2 lib/pipe_rpc/request.rb
pipe_rpc-0.2.0 lib/pipe_rpc/request.rb