Heray-Was-Here
Server : LiteSpeed
System : Linux server310.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : myveqfxv ( 6863)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/proc/self/root/opt/alt/ruby40/share/gems/gems/rdoc-7.0.4/lib/rdoc/markup/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/proc/self/root/opt/alt/ruby40/share/gems/gems/rdoc-7.0.4/lib/rdoc/markup/raw.rb
# frozen_string_literal: true

module RDoc
  class Markup
    # A section of text that is added to the output document as-is
    class Raw
      # The component parts of the list
      #: Array[String]
      attr_reader :parts

      # Creates a new Raw containing +parts+
      #: (*String) -> void
      def initialize(*parts)
        @parts = parts
      end

      # Appends +text+
      #: (String) -> void
      def <<(text)
        @parts << text
      end

      #: (top) -> bool
      def ==(other) # :nodoc:
        self.class == other.class && @parts == other.parts
      end

      # Calls #accept_raw+ on +visitor+
      # @override
      #: (untyped) -> void
      def accept(visitor)
        visitor.accept_raw(self)
      end

      # Appends +other+'s parts
      #: (Raw) -> void
      def merge(other)
        @parts.concat(other.parts)
      end

      # @override
      #: (PP) -> void
      def pretty_print(q) # :nodoc:
        self.class.name =~ /.*::(\w{1,4})/i

        q.group(2, "[#{$1.downcase}: ", ']') do
          q.seplist(@parts) do |part|
            q.pp(part)
          end
        end
      end

      # Appends +texts+ onto this Paragraph
      #: (*String) -> void
      def push(*texts)
        self.parts.concat(texts)
      end

      # The raw text
      #: () -> String
      def text
        @parts.join(" ")
      end
    end
  end
end

Hry