Sha256: 5301a7587e124e80509a06434b5da14f8286a377639fe674badb90df5cc1a6fa

Contents?: true

Size: 727 Bytes

Versions: 2

Compression:

Stored size: 727 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class ShowMessageParams
        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/show_message_params.rb
language_server-protocol-0.3.0 lib/language_server/protocol/interface/show_message_params.rb