Linux tsuru-no-tsurugi 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
Apache/2.4.52 (Ubuntu)
Server IP : 192.168.0.18 & Your IP : 216.73.216.68
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
ruby /
gems /
3.0.0 /
gems /
rbs-1.0.4 /
bin /
Delete
Unzip
Name
Size
Permission
Date
Action
annotate-with-rdoc
4.27
KB
-rw-r--r--
2021-07-07 19:08
console
338
B
-rw-r--r--
2021-07-07 19:08
query-rdoc
2.91
KB
-rw-r--r--
2021-07-07 19:08
rbs-prof
189
B
-rw-r--r--
2021-07-07 19:08
run_in_md.rb
1.17
KB
-rw-r--r--
2021-07-07 19:08
setup
150
B
-rw-r--r--
2021-07-07 19:08
sort
1.81
KB
-rw-r--r--
2021-07-07 19:08
steep
103
B
-rw-r--r--
2021-07-07 19:08
test_runner.rb
710
B
-rw-r--r--
2021-07-07 19:08
Save
Rename
#!/usr/bin/env ruby require "rdoc" def store_for_class(name, stores:) stores.find do |store| store.find_class_named(name) || store.find_module_named(name) end end def format_comment(comment) out = RDoc::Markup::Document.new out << comment formatter = RDoc::Markup::ToMarkdown.new out.accept(formatter) end def comment_for_constant(name, stores:) *class_components, const_name = name.split(/::/) class_name = class_components.join("::") klass = store_for_class(class_name, stores: stores)&.yield_self {|store| store.find_class_named(class_name) || store.find_module_named(class_name) } constant = klass.constants.find do |const| const.name == const_name end if constant&.documented? format_comment(constant.comment) end end def comment_for_class(class_name, stores:) klass = store_for_class(class_name, stores: stores)&.yield_self {|store| store.find_class_named(class_name) || store.find_module_named(class_name) } if klass&.documented? format_comment(klass.comment) end end def comment_for_method(klass, method, stores:) method = store_for_class(klass, stores: stores)&.load_method(klass, method) if method&.documented? out = RDoc::Markup::Document.new out << method.comment if method.arglists out << RDoc::Markup::Heading.new(1, "arglists 💪👽🚨 << Delete this section") arglists = method.arglists.chomp.split("\n").map {|line| line + "\n" } out << RDoc::Markup::Verbatim.new(*arglists) end out.accept(RDoc::Markup::ToMarkdown.new) end rescue RDoc::Store::MissingFileError nil end if ARGV.empty? puts 'query-rdoc [subject]' puts " subject ::= ClassName (class, module, or constant)" puts " | ClassName.method (singleton method)" puts " | ClassName#method (instance method)" exit end stores = [] RDoc::RI::Paths.each true, true, false, false do |path, type| STDERR.puts "Loading store from #{path}..." store = RDoc::RI::Store.new(path, type) store.load_all stores << store end subject = ARGV[0] case when match = subject.match(/(?<constant_name>[^#]+)#(?<method_name>.+)/) STDERR.puts "Finding instance method #{match[:constant_name]} # #{match[:method_name]} ..." comment = comment_for_method(match[:constant_name], "##{match[:method_name]}", stores: stores) when match = subject.match(/(?<constant_name>[^.]+)\.(?<method_name>.+)/) STDERR.puts "Finding singleton method #{match[:constant_name]} . #{match[:method_name]} ..." comment = comment_for_method(match[:constant_name], "::#{match[:method_name]}", stores: stores) else STDERR.puts "Finding class/module/constant #{subject} ..." comment = comment_for_class(subject, stores: stores) || comment_for_constant(subject, stores: stores) end if comment STDERR.puts "Printing document..." comment.each_line do |line| puts "# #{line}" end else STDERR.puts "Nothing to print; failed to query the document..." exit 1 end