Sha256: b0e61694dc31cd685e7467907bb98e0eaf01533079c899c725e93d1143f4faf4

Contents?: true

Size: 652 Bytes

Versions: 7

Compression:

Stored size: 652 Bytes

Contents

module LanguageServer
  module Protocol
    module Interfaces
      #
      # Code Lens options.
      #
      class CodeLensOptions
        def initialize(resolve_provider: nil)
          @attributes = {}

          @attributes[:resolveProvider] = resolve_provider if resolve_provider

          @attributes.freeze
        end

        #
        # Code lens has a resolve provider as well.
        #
        # @return [boolean]
        def resolve_provider
          attributes.fetch(:resolveProvider)
        end

        attr_reader :attributes

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
language_server-protocol-0.2.0 lib/language_server/protocol/interfaces/code_lens_options.rb
language_server-protocol-0.1.0 lib/language_server/protocol/interfaces/code_lens_options.rb
language_server-0.4.0 lib/language_server/protocol/interfaces/code_lens_options.rb
language_server-0.3.1 lib/language_server/protocol/interfaces/code_lens_options.rb
language_server-0.3.0 lib/language_server/protocol/interfaces/code_lens_options.rb
language_server-0.2.0 lib/language_server/protocol/interfaces/code_lens_options.rb
language_server-0.1.0 lib/language_server/protocol/interfaces/code_lens_options.rb