Sha256: 9135eae68fe19c4548679ef494c71532fa256d87363e1a553116bbbdc4452b02
Contents?: true
Size: 904 Bytes
Versions: 7
Compression:
Stored size: 904 Bytes
Contents
module LanguageServer module Protocol module Interfaces class RequestMessage def initialize(id:, method:, params: nil) @attributes = {} @attributes[:id] = id @attributes[:method] = method @attributes[:params] = params if params @attributes.freeze end # # The request id. # # @return [string | number] def id attributes.fetch(:id) end # # The method to be invoked. # # @return [string] def method attributes.fetch(:method) end # # The method's params. # # @return [any] def params attributes.fetch(:params) end attr_reader :attributes def to_json(*args) attributes.to_json(*args) end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems