Sha256: 945838b9865e58b17bd5fb4cc3738e7520683ff73ee2d2b3b2fb033022a5a01c

Contents?: true

Size: 724 Bytes

Versions: 2

Compression:

Stored size: 724 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class LogMessageParams
        def initialize(type:, message:)
          @attributes = {}

          @attributes[:type] = type
          @attributes[:message] = message

          @attributes.freeze
        end

        #
        # The message type. See {@link MessageType}
        #
        # @return [number]
        def type
          attributes.fetch(:type)
        end

        #
        # The actual message
        #
        # @return [string]
        def message
          attributes.fetch(:message)
        end

        attr_reader :attributes

        def to_json(*args)
          attributes.to_json(*args)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
language_server-protocol-0.4.0 lib/language_server/protocol/interface/log_message_params.rb
language_server-protocol-0.3.0 lib/language_server/protocol/interface/log_message_params.rb