관리-도구
편집 파일: cdesc-Directory.yaml
--- !ruby/object:RI::ClassDescription attributes: - !ruby/object:RI::Attribute comment: name: files rw: R - !ruby/object:RI::Attribute comment: name: path rw: RW - !ruby/object:RI::Attribute comment: name: root rw: RW class_methods: - !ruby/object:RI::MethodSummary name: new comment: - !ruby/struct:SM::Flow::P body: Rack::Directory serves entries below the <tt>root</tt> given, according to the path info of the Rack request. If a directory is found, the file's contents will be presented in an html based index. If a file is found, the env will be passed to the specified <tt>app</tt>. - !ruby/struct:SM::Flow::P body: If <tt>app</tt> is not specified, a Rack::File of the same <tt>root</tt> will be used. constants: - !ruby/object:RI::Constant comment: name: DIR_FILE value: "\"<tr><td class='name'><a href='%s'>%s</a></td><td class='size'>%s</td><td class='type'>%s</td><td class='mtime'>%s</td></tr>\"" - !ruby/object:RI::Constant comment: name: DIR_PAGE value: <<-PAGE <html><head> <title>%s</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type='text/css'> table { width:100%%; } .name { text-align:left; } .size, .mtime { text-align:right; } .type { width:11em; } .mtime { width:15em; } </style> </head><body> <h1>%s</h1> <hr /> <table> <tr> <th class='name'>Name</th> <th class='size'>Size</th> <th class='type'>Type</th> <th class='mtime'>Last Modified</th> </tr> %s </table> <hr /> </body></html> PAGE - !ruby/object:RI::Constant comment: name: F value: "::File" - !ruby/object:RI::Constant comment: - !ruby/struct:SM::Flow::P body: Stolen from Ramaze name: FILESIZE_FORMAT value: "[ ['%.1fT', 1 << 40], ['%.1fG', 1 << 30], ['%.1fM', 1 << 20], ['%.1fK', 1 << 10], ]" full_name: Rack::Directory includes: [] instance_methods: - !ruby/object:RI::MethodSummary name: _call - !ruby/object:RI::MethodSummary name: call - !ruby/object:RI::MethodSummary name: check_forbidden - !ruby/object:RI::MethodSummary name: each - !ruby/object:RI::MethodSummary name: entity_not_found - !ruby/object:RI::MethodSummary name: filesize_format - !ruby/object:RI::MethodSummary name: list_directory - !ruby/object:RI::MethodSummary name: list_path - !ruby/object:RI::MethodSummary name: stat name: Directory superclass: Object