class RubyLsp::ResponseBuilders::Hover

def empty?

def empty?
  @response.values.all?(&:empty?)
end

def initialize

def initialize
  super
  @response = T.let(
    {
      title: +"",
      links: +"",
      documentation: +"",
    },
    T::Hash[Symbol, String],
  )
end

def push(content, category:)

def push(content, category:)
  hover_content = @response[category]
  if hover_content
    hover_content << content + "\n"
  end
end

def response

def response
  result = T.must(@response[:title])
  result << "\n" << @response[:links] if @response[:links]
  result << "\n" << @response[:documentation] if @response[:documentation]
  result.strip
end