Sha256: a5d45555a5deb14892a83959705c04010bb3d562c977d515df9d826d474372de

Contents?: true

Size: 575 Bytes

Versions: 55

Compression:

Stored size: 575 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module RubyLsp
  module ResponseBuilders
    class CollectionResponseBuilder < ResponseBuilder
      extend T::Sig
      extend T::Generic

      ResponseType = type_member { { upper: Object } }

      sig { void }
      def initialize
        super
        @items = T.let([], T::Array[ResponseType])
      end

      sig { params(item: ResponseType).void }
      def <<(item)
        @items << item
      end

      sig { override.returns(T::Array[ResponseType]) }
      def response
        @items
      end
    end
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
ruby-lsp-0.23.6 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.23.5 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.23.4 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.23.3 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.23.2 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.23.1 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.23.0 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.22.1 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.22.0 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.21.3 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.21.2 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.21.1 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.21.0 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.20.1 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.20.0 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.19.1 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.19.0 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.18.4 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.18.3 lib/ruby_lsp/response_builders/collection_response_builder.rb
ruby-lsp-0.18.2 lib/ruby_lsp/response_builders/collection_response_builder.rb