You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: xpath.rb
    path of file: ./repos/watir/lib/watir/locators/button/selector_builder
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Watir
  module Locators
    class Button
      class SelectorBuilder
        class XPath < Elemen
    
          def text_string
            return super if @adjacent

            # :text locator is already dealt with in #tag_name_string
            value = @selector.delete(:value)

            return '' if value.nil?

            result = value.nil? ? '' : "[#{process_attribute(:text, value)} or #{process_attribute(:value, value)}]"
            @built.delete(:text)
            result
          end