GRAYBYTE WORDPRESS FILE MANAGER4500

Server IP : 198.54.121.189 / Your IP : 216.73.216.140
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /opt/alt/ruby33/share/ruby/prism/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /opt/alt/ruby33/share/ruby/prism//node_inspector.rb
# frozen_string_literal: true

module Prism
  # This object is responsible for generating the output for the inspect method
  # implementations of child nodes.
  class NodeInspector # :nodoc:
    attr_reader :prefix, :output

    def initialize(prefix = "")
      @prefix = prefix
      @output = +""
    end

    # Appends a line to the output with the current prefix.
    def <<(line)
      output << "#{prefix}#{line}"
    end

    # This generates a string that is used as the header of the inspect output
    # for any given node.
    def header(node)
      output = +"@ #{node.class.name.split("::").last} ("
      output << "location: (#{node.location.start_line},#{node.location.start_column})-(#{node.location.end_line},#{node.location.end_column})"
      output << ", newline: true" if node.newline?
      output << ")\n"
      output
    end

    # Generates a string that represents a list of nodes. It handles properly
    # using the box drawing characters to make the output look nice.
    def list(prefix, nodes)
      output = +"(length: #{nodes.length})\n"
      last_index = nodes.length - 1

      nodes.each_with_index do |node, index|
        pointer, preadd = (index == last_index) ? ["└── ", "    "] : ["├── ", "│   "]
        node_prefix = "#{prefix}#{preadd}"
        output << node.inspect(NodeInspector.new(node_prefix)).sub(node_prefix, "#{prefix}#{pointer}")
      end

      output
    end

    # Generates a string that represents a location field on a node.
    def location(value)
      if value
        "(#{value.start_line},#{value.start_column})-(#{value.end_line},#{value.end_column}) = #{value.slice.inspect}"
      else
        "∅"
      end
    end

    # Generates a string that represents a child node.
    def child_node(node, append)
      node.inspect(child_inspector(append)).delete_prefix(prefix)
    end

    # Returns a new inspector that can be used to inspect a child node.
    def child_inspector(append)
      NodeInspector.new("#{prefix}#{append}")
    end

    # Returns the output as a string.
    def to_str
      output
    end
  end
end

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
May 13 2025 08:35:34
root / linksafe
0755
parse_result
--
May 13 2025 08:35:29
root / linksafe
0755
compiler.rb
14.879 KB
April 24 2025 07:57:44
root / linksafe
0644
debug.rb
6.117 KB
April 24 2025 07:57:44
root / linksafe
0644
desugar_compiler.rb
5.714 KB
April 24 2025 07:57:44
root / linksafe
0644
dispatcher.rb
108.899 KB
April 24 2025 07:57:44
root / linksafe
0644
dsl.rb
31.989 KB
April 24 2025 07:57:44
root / linksafe
0644
ffi.rb
10.266 KB
April 24 2025 07:57:44
root / linksafe
0644
lex_compat.rb
31.038 KB
April 24 2025 07:57:44
root / linksafe
0644
mutation_compiler.rb
20.81 KB
April 24 2025 07:57:44
root / linksafe
0644
node.rb
575.41 KB
April 24 2025 07:57:44
root / linksafe
0644
node_ext.rb
5.013 KB
April 24 2025 07:57:44
root / linksafe
0644
node_inspector.rb
2.063 KB
April 24 2025 07:57:44
root / linksafe
0644
pack.rb
5.766 KB
April 24 2025 07:57:44
root / linksafe
0644
parse_result.rb
13.43 KB
April 24 2025 07:57:44
root / linksafe
0644
pattern.rb
7.558 KB
April 24 2025 07:57:44
root / linksafe
0644
ripper_compat.rb
5.948 KB
April 24 2025 07:57:44
root / linksafe
0644
serialize.rb
56.708 KB
April 24 2025 07:57:44
root / linksafe
0644
visitor.rb
15.022 KB
April 24 2025 07:57:44
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF