Sha256: b2b952d488d395dbea49c232c317f14e775b8a23d3b99845c6a4266d213138c1

Contents?: true

Size: 1.5 KB

Versions: 102

Compression:

Stored size: 1.5 KB

Contents

module LanguageServer
  module Protocol
    module Interface
      class ApplyWorkspaceEditResult
        def initialize(applied:, failure_reason: nil, failed_change: nil)
          @attributes = {}

          @attributes[:applied] = applied
          @attributes[:failureReason] = failure_reason if failure_reason
          @attributes[:failedChange] = failed_change if failed_change

          @attributes.freeze
        end

        #
        # Indicates whether the edit was applied or not.
        #
        # @return [boolean]
        def applied
          attributes.fetch(:applied)
        end

        #
        # An optional textual description for why the edit was not applied.
        # This may be used by the server for diagnostic logging or to provide
        # a suitable error for a request that triggered the edit.
        #
        # @return [string]
        def failure_reason
          attributes.fetch(:failureReason)
        end

        #
        # Depending on the client's failure handling strategy `failedChange`
        # might contain the index of the change that failed. This property is
        # only available if the client signals a `failureHandling` strategy
        # in its client capabilities.
        #
        # @return [number]
        def failed_change
          attributes.fetch(:failedChange)
        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

102 entries across 102 versions & 12 rubygems

Version Path
harbr-0.1.41 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
harbr-0.1.39 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
harbr-0.1.38 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
harbr-0.1.37 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
study_line-0.1.6 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
study_line-0.1.5 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
study_line-0.1.4 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
study_line-0.1.3 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
study_line-0.1.2 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
study_line-0.1.1 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
synctera_ruby_sdk-1.1.3 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
synctera_ruby_sdk-1.1.2 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
synctera_ruby_sdk-1.1.1 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
sampero-0.1.0 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
tursodb-0.1.0 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
synctera_ruby_sdk-1.0.0 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
mlh-rubocop-config-1.0.2 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
fablicop-1.10.3 vendor/bundle/ruby/3.2.0/gems/language_server-protocol-3.17.0.3/lib/language_server/protocol/interface/apply_workspace_edit_result.rb
language_server-protocol-3.17.0.3 lib/language_server/protocol/interface/apply_workspace_edit_result.rb