Sha256: 4862a15a037363ebeaaa6a2adccabf859896db5791e7a1fed2f9dcd0cf12e069

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 Bytes

Contents

module LanguageServer
  module Protocol
    module Interface
      class Location
        def initialize(uri:, range:)
          @attributes = {}

          @attributes[:uri] = uri
          @attributes[:range] = range

          @attributes.freeze
        end

        # @return [string]
        def uri
          attributes.fetch(:uri)
        end

        # @return [Range]
        def range
          attributes.fetch(:range)
        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/location.rb
language_server-protocol-0.3.0 lib/language_server/protocol/interface/location.rb