Sha256: 5f6de851dd5c086eeaedc4a8549a8db56deeee40a6c222c11d242a6f409afe44

Contents?: true

Size: 1.46 KB

Versions: 104

Compression:

Stored size: 1.46 KB

Contents

module LanguageServer
  module Protocol
    module Interface
      #
      # Rename file operation
      #
      class RenameFile
        def initialize(kind:, old_uri:, new_uri:, options: nil, annotation_id: nil)
          @attributes = {}

          @attributes[:kind] = kind
          @attributes[:oldUri] = old_uri
          @attributes[:newUri] = new_uri
          @attributes[:options] = options if options
          @attributes[:annotationId] = annotation_id if annotation_id

          @attributes.freeze
        end

        #
        # A rename
        #
        # @return ["rename"]
        def kind
          attributes.fetch(:kind)
        end

        #
        # The old (existing) location.
        #
        # @return [string]
        def old_uri
          attributes.fetch(:oldUri)
        end

        #
        # The new location.
        #
        # @return [string]
        def new_uri
          attributes.fetch(:newUri)
        end

        #
        # Rename options.
        #
        # @return [RenameFileOptions]
        def options
          attributes.fetch(:options)
        end

        #
        # An optional annotation identifier describing the operation.
        #
        # @return [string]
        def annotation_id
          attributes.fetch(:annotationId)
        end

        attr_reader :attributes

        def to_hash
          attributes
        end

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

Version data entries

104 entries across 104 versions & 13 rubygems

Version Path
harbr-0.1.64 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.63 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.62 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.61 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.60 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.59 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.58 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.57 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.56 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.55 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.54 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.53 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.52 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.50 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.49 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.48 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.47 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.46 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.45 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb
harbr-0.1.44 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/rename_file.rb