eaiovnaovbqoebvqoeavibavo PKJ8jZoJJ darkfish.rbnu[# -*- mode: ruby; ruby-indent-level: 2; tab-width: 2 -*- require 'erb' require 'fileutils' require 'pathname' require 'rdoc/generator/markup' ## # Darkfish RDoc HTML Generator # # $Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $ # # == Author/s # * Michael Granger (ged@FaerieMUD.org) # # == Contributors # * Mahlon E. Smith (mahlon@martini.nu) # * Eric Hodel (drbrain@segment7.net) # # == License # # Copyright (c) 2007, 2008, Michael Granger. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # * Neither the name of the author/s, nor the names of the project's # contributors may be used to endorse or promote products derived from this # software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # == Attributions # # Darkfish uses the {Silk Icons}[http://www.famfamfam.com/lab/icons/silk/] set # by Mark James. class RDoc::Generator::Darkfish RDoc::RDoc.add_generator self include ERB::Util ## # Path to this file's parent directory. Used to find templates and other # resources. GENERATOR_DIR = File.join 'rdoc', 'generator' ## # Release Version VERSION = '3' ## # Description of this generator DESCRIPTION = 'HTML generator, written by Michael Granger' ## # The relative path to style sheets and javascript. By default this is set # the same as the rel_prefix. attr_accessor :asset_rel_path ## # The path to generate files into, combined with --op from the # options for a full path. attr_reader :base_dir ## # Classes and modules to be used by this generator, not necessarily # displayed. See also #modsort attr_reader :classes ## # No files will be written when dry_run is true. attr_accessor :dry_run ## # When false the generate methods return a String instead of writing to a # file. The default is true. attr_accessor :file_output ## # Files to be displayed by this generator attr_reader :files ## # The JSON index generator for this Darkfish generator attr_reader :json_index ## # Methods to be displayed by this generator attr_reader :methods ## # Sorted list of classes and modules to be displayed by this generator attr_reader :modsort ## # The RDoc::Store that is the source of the generated content attr_reader :store ## # The output directory attr_reader :outputdir ## # Initialize a few instance variables before we start def initialize store, options @store = store @options = options @asset_rel_path = '' @base_dir = Pathname.pwd.expand_path @dry_run = @options.dry_run @file_output = true @template_dir = Pathname.new options.template_dir @template_cache = {} @classes = nil @context = nil @files = nil @methods = nil @modsort = nil @json_index = RDoc::Generator::JsonIndex.new self, options end ## # Output progress information if debugging is enabled def debug_msg *msg return unless $DEBUG_RDOC $stderr.puts(*msg) end ## # Directory where generated class HTML files live relative to the output # dir. def class_dir nil end ## # Directory where generated class HTML files live relative to the output # dir. def file_dir nil end ## # Create the directories the generated docs will live in if they don't # already exist. def gen_sub_directories @outputdir.mkpath end ## # Copy over the stylesheet into the appropriate place in the output # directory. def write_style_sheet debug_msg "Copying static files" options = { :verbose => $DEBUG_RDOC, :noop => @dry_run } FileUtils.cp @template_dir + 'rdoc.css', '.', options Dir[(@template_dir + "{js,images}/**/*").to_s].each do |path| next if File.directory? path next if File.basename(path) =~ /^\./ dst = Pathname.new(path).relative_path_from @template_dir # I suck at glob dst_dir = dst.dirname FileUtils.mkdir_p dst_dir, options unless File.exist? dst_dir FileUtils.cp @template_dir + path, dst, options end end ## # Build the initial indices and output objects based on an array of TopLevel # objects containing the extracted information. def generate setup write_style_sheet generate_index generate_class_files generate_file_files generate_table_of_contents @json_index.generate copy_static rescue => e debug_msg "%s: %s\n %s" % [ e.class.name, e.message, e.backtrace.join("\n ") ] raise end ## # Copies static files from the static_path into the output directory def copy_static return if @options.static_path.empty? fu_options = { :verbose => $DEBUG_RDOC, :noop => @dry_run } @options.static_path.each do |path| unless File.directory? path then FileUtils.install path, @outputdir, fu_options.merge(:mode => 0644) next end Dir.chdir path do Dir[File.join('**', '*')].each do |entry| dest_file = @outputdir + entry if File.directory? entry then FileUtils.mkdir_p entry, fu_options else FileUtils.install entry, dest_file, fu_options.merge(:mode => 0644) end end end end end ## # Return a list of the documented modules sorted by salience first, then # by name. def get_sorted_module_list classes classes.select do |klass| klass.display? end.sort end ## # Generate an index page which lists all the classes which are documented. def generate_index setup template_file = @template_dir + 'index.rhtml' return unless template_file.exist? debug_msg "Rendering the index page..." out_file = @base_dir + @options.op_dir + 'index.html' rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path @title = @options.title render_template template_file, out_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating index.html: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generates a class file for +klass+ def generate_class klass, template_file = nil setup current = klass template_file ||= @template_dir + 'class.rhtml' debug_msg " working on %s (%s)" % [klass.full_name, klass.path] out_file = @outputdir + klass.path rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path svninfo = svninfo = get_svninfo(current) @title = "#{klass.type} #{klass.full_name} - #{@options.title}" debug_msg " rendering #{out_file}" render_template template_file, out_file do |io| binding end end ## # Generate a documentation file for each class and module def generate_class_files setup template_file = @template_dir + 'class.rhtml' template_file = @template_dir + 'classpage.rhtml' unless template_file.exist? return unless template_file.exist? debug_msg "Generating class documentation in #{@outputdir}" current = nil @classes.each do |klass| current = klass generate_class klass, template_file end rescue => e error = RDoc::Error.new \ "error generating #{current.path}: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generate a documentation file for each file def generate_file_files setup page_file = @template_dir + 'page.rhtml' fileinfo_file = @template_dir + 'fileinfo.rhtml' # for legacy templates filepage_file = @template_dir + 'filepage.rhtml' unless page_file.exist? or fileinfo_file.exist? return unless page_file.exist? or fileinfo_file.exist? or filepage_file.exist? debug_msg "Generating file documentation in #{@outputdir}" out_file = nil current = nil @files.each do |file| current = file if file.text? and page_file.exist? then generate_page file next end template_file = nil out_file = @outputdir + file.path debug_msg " working on %s (%s)" % [file.full_name, out_file] rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path unless filepage_file then if file.text? then next unless page_file.exist? template_file = page_file @title = file.page_name else next unless fileinfo_file.exist? template_file = fileinfo_file @title = "File: #{file.base_name}" end end @title += " - #{@options.title}" template_file ||= filepage_file render_template template_file, out_file do |io| binding end end rescue => e error = RDoc::Error.new "error generating #{out_file}: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generate a page file for +file+ def generate_page file setup template_file = @template_dir + 'page.rhtml' out_file = @outputdir + file.path debug_msg " working on %s (%s)" % [file.full_name, out_file] rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning current = current = file asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path @title = "#{file.page_name} - #{@options.title}" debug_msg " rendering #{out_file}" render_template template_file, out_file do |io| binding end end ## # Generates the 404 page for the RDoc servlet def generate_servlet_not_found path setup template_file = @template_dir + 'servlet_not_found.rhtml' return unless template_file.exist? debug_msg "Rendering the servlet 404 Not Found page..." rel_prefix = rel_prefix = '' search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = '' @title = 'Not Found' render_template template_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating servlet_not_found: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generates the servlet root page for the RDoc servlet def generate_servlet_root installed setup template_file = @template_dir + 'servlet_root.rhtml' return unless template_file.exist? debug_msg 'Rendering the servlet root page...' rel_prefix = '.' asset_rel_prefix = rel_prefix search_index_rel_prefix = asset_rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output @title = 'Local RDoc Documentation' render_template template_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating servlet_root: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Generate an index page which lists all the classes which are documented. def generate_table_of_contents setup template_file = @template_dir + 'table_of_contents.rhtml' return unless template_file.exist? debug_msg "Rendering the Table of Contents..." out_file = @outputdir + 'table_of_contents.html' rel_prefix = @outputdir.relative_path_from out_file.dirname search_index_rel_prefix = rel_prefix search_index_rel_prefix += @asset_rel_path if @file_output # suppress 1.9.3 warning asset_rel_prefix = asset_rel_prefix = rel_prefix + @asset_rel_path @title = "Table of Contents - #{@options.title}" render_template template_file, out_file do |io| binding end rescue => e error = RDoc::Error.new \ "error generating table_of_contents.html: #{e.message} (#{e.class})" error.set_backtrace e.backtrace raise error end ## # Prepares for generation of output from the current directory def setup return if instance_variable_defined? :@outputdir @outputdir = Pathname.new(@options.op_dir).expand_path @base_dir return unless @store @classes = @store.all_classes_and_modules.sort @files = @store.all_files.sort @methods = @classes.map { |m| m.method_list }.flatten.sort @modsort = get_sorted_module_list @classes end ## # Return a string describing the amount of time in the given number of # seconds in terms a human can understand easily. def time_delta_string seconds return 'less than a minute' if seconds < 60 return "#{seconds / 60} minute#{seconds / 60 == 1 ? '' : 's'}" if seconds < 3000 # 50 minutes return 'about one hour' if seconds < 5400 # 90 minutes return "#{seconds / 3600} hours" if seconds < 64800 # 18 hours return 'one day' if seconds < 86400 # 1 day return 'about one day' if seconds < 172800 # 2 days return "#{seconds / 86400} days" if seconds < 604800 # 1 week return 'about one week' if seconds < 1209600 # 2 week return "#{seconds / 604800} weeks" if seconds < 7257600 # 3 months return "#{seconds / 2419200} months" if seconds < 31536000 # 1 year return "#{seconds / 31536000} years" end # %q$Id: darkfish.rb 52 2009-01-07 02:08:11Z deveiant $" SVNID_PATTERN = / \$Id:\s (\S+)\s # filename (\d+)\s # rev (\d{4}-\d{2}-\d{2})\s # Date (YYYY-MM-DD) (\d{2}:\d{2}:\d{2}Z)\s # Time (HH:MM:SSZ) (\w+)\s # committer \$$ /x ## # Try to extract Subversion information out of the first constant whose # value looks like a subversion Id tag. If no matching constant is found, # and empty hash is returned. def get_svninfo klass constants = klass.constants or return {} constants.find { |c| c.value =~ SVNID_PATTERN } or return {} filename, rev, date, time, committer = $~.captures commitdate = Time.parse "#{date} #{time}" return { :filename => filename, :rev => Integer(rev), :commitdate => commitdate, :commitdelta => time_delta_string(Time.now - commitdate), :committer => committer, } end ## # Creates a template from its components and the +body_file+. # # For backwards compatibility, if +body_file+ contains " #{head_file.read} #{body} #{footer_file.read} TEMPLATE end ## # Renders the ERb contained in +file_name+ relative to the template # directory and returns the result based on the current context. def render file_name template_file = @template_dir + file_name template = template_for template_file, false, RDoc::ERBPartial template.filename = template_file.to_s template.result @context end ## # Load and render the erb template in the given +template_file+ and write # it out to +out_file+. # # Both +template_file+ and +out_file+ should be Pathname-like objects. # # An io will be yielded which must be captured by binding in the caller. def render_template template_file, out_file = nil # :yield: io io_output = out_file && !@dry_run && @file_output erb_klass = io_output ? RDoc::ERBIO : ERB template = template_for template_file, true, erb_klass if io_output then debug_msg "Outputting to %s" % [out_file.expand_path] out_file.dirname.mkpath out_file.open 'w', 0644 do |io| io.set_encoding @options.encoding if Object.const_defined? :Encoding @context = yield io template_result template, @context, template_file end else @context = yield nil output = template_result template, @context, template_file debug_msg " would have written %d characters to %s" % [ output.length, out_file.expand_path ] if @dry_run output end end ## # Creates the result for +template+ with +context+. If an error is raised a # Pathname +template_file+ will indicate the file where the error occurred. def template_result template, context, template_file template.filename = template_file.to_s template.result context rescue NoMethodError => e raise RDoc::Error, "Error while evaluating %s: %s" % [ template_file.expand_path, e.message, ], e.backtrace end ## # Retrieves a cache template for +file+, if present, or fills the cache. def template_for file, page = true, klass = ERB template = @template_cache[file] return template if template if page then template = assemble_template file erbout = 'io' else template = file.read template = template.encode @options.encoding if Object.const_defined? :Encoding file_var = File.basename(file).sub(/\..*/, '') erbout = "_erbout_#{file_var}" end template = klass.new template, nil, '<>', erbout @template_cache[file] = template template end end PKJ8jZsoxri.rbnu[## # Generates ri data files class RDoc::Generator::RI RDoc::RDoc.add_generator self ## # Description of this generator DESCRIPTION = 'creates ri data files' ## # Set up a new ri generator def initialize store, options #:not-new: @options = options @store = store @store.path = '.' end ## # Writes the parsed data store to disk for use by ri. def generate @store.save end end PKJ8jZ 5 json_index.rbnu[require 'json' ## # The JsonIndex generator is designed to complement an HTML generator and # produces a JSON search index. This generator is derived from sdoc by # Vladimir Kolesnikov and contains verbatim code written by him. # # This generator is designed to be used with a regular HTML generator: # # class RDoc::Generator::Darkfish # def initialize options # # ... # @base_dir = Pathname.pwd.expand_path # # @json_index = RDoc::Generator::JsonIndex.new self, options # end # # def generate # # ... # @json_index.generate # end # end # # == Index Format # # The index is output as a JSON file assigned to the global variable # +search_data+. The structure is: # # var search_data = { # "index": { # "searchIndex": # ["a", "b", ...], # "longSearchIndex": # ["a", "a::b", ...], # "info": [ # ["A", "A", "A.html", "", ""], # ["B", "A::B", "A::B.html", "", ""], # ... # ] # } # } # # The same item is described across the +searchIndex+, +longSearchIndex+ and # +info+ fields. The +searchIndex+ field contains the item's short name, the # +longSearchIndex+ field contains the full_name (when appropriate) and the # +info+ field contains the item's name, full_name, path, parameters and a # snippet of the item's comment. # # == LICENSE # # Copyright (c) 2009 Vladimir Kolesnikov # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. class RDoc::Generator::JsonIndex include RDoc::Text ## # Where the search index lives in the generated output SEARCH_INDEX_FILE = File.join 'js', 'search_index.js' attr_reader :index # :nodoc: ## # Creates a new generator. +parent_generator+ is used to determine the # class_dir and file_dir of links in the output index. # # +options+ are the same options passed to the parent generator. def initialize parent_generator, options @parent_generator = parent_generator @store = parent_generator.store @options = options @template_dir = File.expand_path '../template/json_index', __FILE__ @base_dir = @parent_generator.base_dir @classes = nil @files = nil @index = nil end ## # Builds the JSON index as a Hash. def build_index reset @store.all_files.sort, @store.all_classes_and_modules.sort index_classes index_methods index_pages { :index => @index } end ## # Output progress information if debugging is enabled def debug_msg *msg return unless $DEBUG_RDOC $stderr.puts(*msg) end ## # Writes the JSON index to disk def generate debug_msg "Generating JSON index" debug_msg " writing search index to %s" % SEARCH_INDEX_FILE data = build_index return if @options.dry_run out_dir = @base_dir + @options.op_dir index_file = out_dir + SEARCH_INDEX_FILE FileUtils.mkdir_p index_file.dirname, :verbose => $DEBUG_RDOC index_file.open 'w', 0644 do |io| io.set_encoding Encoding::UTF_8 if Object.const_defined? :Encoding io.write 'var search_data = ' JSON.dump data, io, 0 end Dir.chdir @template_dir do Dir['**/*.js'].each do |source| dest = File.join out_dir, source FileUtils.install source, dest, :mode => 0644, :verbose => $DEBUG_RDOC end end end ## # Adds classes and modules to the index def index_classes debug_msg " generating class search index" documented = @classes.uniq.select do |klass| klass.document_self_or_methods end documented.each do |klass| debug_msg " #{klass.full_name}" record = klass.search_record @index[:searchIndex] << search_string(record.shift) @index[:longSearchIndex] << search_string(record.shift) @index[:info] << record end end ## # Adds methods to the index def index_methods debug_msg " generating method search index" list = @classes.uniq.map do |klass| klass.method_list end.flatten.sort_by do |method| [method.name, method.parent.full_name] end list.each do |method| debug_msg " #{method.full_name}" record = method.search_record @index[:searchIndex] << "#{search_string record.shift}()" @index[:longSearchIndex] << "#{search_string record.shift}()" @index[:info] << record end end ## # Adds pages to the index def index_pages debug_msg " generating pages search index" pages = @files.select do |file| file.text? end pages.each do |page| debug_msg " #{page.page_name}" record = page.search_record @index[:searchIndex] << search_string(record.shift) @index[:longSearchIndex] << '' record.shift @index[:info] << record end end ## # The directory classes are written to def class_dir @parent_generator.class_dir end ## # The directory files are written to def file_dir @parent_generator.file_dir end def reset files, classes # :nodoc: @files = files @classes = classes @index = { :searchIndex => [], :longSearchIndex => [], :info => [] } end ## # Removes whitespace and downcases +string+ def search_string string string.downcase.gsub(/\s/, '') end end PKJ8jZ9YB B template/darkfish/js/search.jsnu[Search = function(data, input, result) { this.data = data; this.$input = $(input); this.$result = $(result); this.$current = null; this.$view = this.$result.parent(); this.searcher = new Searcher(data.index); this.init(); } Search.prototype = $.extend({}, Navigation, new function() { var suid = 1; this.init = function() { var _this = this; var observer = function() { _this.search(_this.$input[0].value); }; this.$input.keyup(observer); this.$input.click(observer); // mac's clear field this.searcher.ready(function(results, isLast) { _this.addResults(results, isLast); }) this.initNavigation(); this.setNavigationActive(false); } this.search = function(value, selectFirstMatch) { value = jQuery.trim(value).toLowerCase(); if (value) { this.setNavigationActive(true); } else { this.setNavigationActive(false); } if (value == '') { this.lastQuery = value; this.$result.empty(); this.setNavigationActive(false); } else if (value != this.lastQuery) { this.lastQuery = value; this.firstRun = true; this.searcher.find(value); } } this.addResults = function(results, isLast) { var target = this.$result.get(0); if (this.firstRun && (results.length > 0 || isLast)) { this.$current = null; this.$result.empty(); } for (var i=0, l = results.length; i < l; i++) { target.appendChild(this.renderItem.call(this, results[i])); }; if (this.firstRun && results.length > 0) { this.firstRun = false; this.$current = $(target.firstChild); this.$current.addClass('current'); } if (jQuery.browser.msie) this.$element[0].className += ''; } this.move = function(isDown) { if (!this.$current) return; var $next = this.$current[isDown ? 'next' : 'prev'](); if ($next.length) { this.$current.removeClass('current'); $next.addClass('current'); this.scrollIntoView($next[0], this.$view[0]); this.$current = $next; } return true; } this.hlt = function(html) { return this.escapeHTML(html). replace(/\u0001/g, ''). replace(/\u0002/g, ''); } this.escapeHTML = function(html) { return html.replace(/[&<>]/g, function(c) { return '&#' + c.charCodeAt(0) + ';'; }); } }); PKJ8jZY, template/darkfish/js/darkfish.jsnu[/** * * Darkfish Page Functions * $Id: darkfish.js 53 2009-01-07 02:52:03Z deveiant $ * * Author: Michael Granger * */ /* Provide console simulation for firebug-less environments */ if (!("console" in window) || !("firebug" in console)) { var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; window.console = {}; for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {}; }; /** * Unwrap the first element that matches the given @expr@ from the targets and return them. */ $.fn.unwrap = function( expr ) { return this.each( function() { $(this).parents( expr ).eq( 0 ).after( this ).remove(); }); }; function showSource( e ) { var target = e.target; var codeSections = $(target). parents('.method-detail'). find('.method-source-code'); $(target). parents('.method-detail'). find('.method-source-code'). slideToggle(); }; function hookSourceViews() { $('.method-heading').click( showSource ); }; function toggleDebuggingSection() { $('.debugging-section').slideToggle(); }; function hookDebuggingToggle() { $('#debugging-toggle img').click( toggleDebuggingSection ); }; function hookTableOfContentsToggle() { $('.indexpage li .toc-toggle').each( function() { $(this).click( function() { $(this).toggleClass('open'); }); var section = $(this).next(); $(this).click( function() { section.slideToggle(); }); }); } function hookSearch() { var input = $('#search-field').eq(0); var result = $('#search-results').eq(0); $(result).show(); var search_section = $('#search-section').get(0); $(search_section).show(); var search = new Search(search_data, input, result); search.renderItem = function(result) { var li = document.createElement('li'); var html = ''; // TODO add relative path to PKJ8jZ$v)template/darkfish/_sidebar_VCS_info.rhtmlnu[<% if !svninfo.empty? then %> <% end %> PKJ8jZ:}(}(template/darkfish/rdoc.cssnu[/* * "Darkfish" Rdoc CSS * $Id: rdoc.css 54 2009-01-27 01:09:48Z deveiant $ * * Author: Michael Granger * */ /* vim: ft=css et sw=2 ts=2 sts=2 */ /* Base Green is: #6C8C22 */ * { padding: 0; margin: 0; } body { background: #efefef; font: 14px "Helvetica Neue", Helvetica, Tahoma, sans-serif; margin-left: 40px; } body.file-popup { font-size: 90%; margin-left: 0; } h1 { font-size: 300%; text-shadow: rgba(135,145,135,0.65) 2px 2px 3px; color: #6C8C22; } h2,h3,h4 { margin-top: 1.5em; } h1 span, h2 span, h3 span, h4 span, h5 span, h6 span { display: none; padding-left: 1em; font-size: 50%; vertical-align: super; } h1:hover span, h2:hover span, h3:hover span, h4:hover span, h5:hover span, h6:hover span { display: inline; } :link, :visited { color: #6C8C22; text-decoration: none; } :link:hover, :visited:hover { border-bottom: 1px dotted #6C8C22; } pre { background: #ddd; padding: 0.5em 0; } blockquote { background: #ddd; margin: 1em; padding: 0.25em; } blockquote > :first-child { margin-top: 0 !important; } /* @group Generic Classes */ .initially-hidden { display: none; } #search-field { width: 98%; background: #eee; border: none; height: 1.5em; -webkit-border-radius: 4px; } #search-field:focus { background: #f1edba; } #search-field:-moz-placeholder, #search-field::-webkit-input-placeholder { font-weight: bold; color: #666; } .missing-docs { font-size: 120%; background: white url(images/wrench_orange.png) no-repeat 4px center; color: #ccc; line-height: 2em; border: 1px solid #d00; opacity: 1; padding-left: 20px; text-indent: 24px; letter-spacing: 3px; font-weight: bold; -webkit-border-radius: 5px; -moz-border-radius: 5px; } .target-section { border: 2px solid #dcce90; border-left-width: 8px; padding: 0 1em; background: #fff3c2; } /* @end */ /* @group Index Page, Standalone file pages */ .indexpage ul { line-height: 160%; list-style: none; } .indexpage ul :link, .indexpage ul :visited { font-size: 16px; } .indexpage li { padding-left: 20px; } .indexpage ul > li { background: url(images/bullet_black.png) no-repeat left 4px; } .indexpage li.method { background: url(images/plugin.png) no-repeat left 4px; } .indexpage li.module { background: url(images/package.png) no-repeat left 4px; } .indexpage li.class { background: url(images/ruby.png) no-repeat left 4px; } .indexpage li.file { background: url(images/page_white_text.png) no-repeat left 4px; } .indexpage li li { background: url(images/tag_blue.png) no-repeat left 4px; } .indexpage li .toc-toggle { width: 16px; height: 16px; background: url(images/add.png) no-repeat; } .indexpage li .toc-toggle.open { background: url(images/delete.png) no-repeat; } /* @end */ /* @group Top-Level Structure */ #metadata { float: left; width: 260px; } #documentation { margin: 2em 1em 5em 300px; min-width: 340px; } #validator-badges { clear: both; margin: 1em 1em 2em; font-size: smaller; } /* @end */ /* @group Metadata Section */ #metadata .section { background-color: #dedede; -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #aaa; margin: 0 8px 8px; font-size: 90%; overflow: hidden; } #metadata h3.section-header { margin: 0; padding: 2px 8px; background: #ccc; color: #666; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-bottom: 1px solid #aaa; } #metadata #home-section h3.section-header { border-bottom: 0; } #metadata ul, #metadata dl, #metadata p { padding: 8px; list-style: none; } #file-metadata { margin-top: 2em; } #file-metadata ul { padding-left: 28px; list-style-image: url(images/page_green.png); } #table-of-contents { margin-top: 2em; } #table-of-contents ul { padding-left: 28px; list-style-image: url(images/tag_blue.png); } dl.svninfo { color: #666; margin: 0; } dl.svninfo dt { font-weight: bold; } ul.link-list li { white-space: nowrap; line-height: 20px; } ul.link-list .type { font-size: 8px; text-transform: uppercase; color: white; background: #969696; padding: 2px 4px; -webkit-border-radius: 5px; } .calls-super { background: url(images/arrow_up.png) no-repeat right center; } /* @end */ /* @group Class Metadata Section */ #class-metadata { margin-top: 2em; } /* @end */ /* @group Project Metadata Section */ #project-metadata { margin-top: 2em; } #project-metadata .section { border: 1px solid #aaa; } #project-metadata h3.section-header { border-bottom: 1px solid #aaa; position: relative; } #project-metadata form { color: #777; background: #ccc; } /* @end */ /* @group Documentation Section */ .description { font-size: 100%; color: #333; } .description p { margin: 1em 0.4em; } .description li p { margin: 0; } .description ol, .description ul { margin-left: 1.5em; } .description ol li, .description ul li { line-height: 1.4em; } .note-list { margin: 8px 0; } .label-list { margin: 8px 1.5em; border: 1px solid #ccc; } .description .label-list { font-size: 14px; } .note-list dt { font-weight: bold; } .note-list dd { padding: 0 12px; } .label-list dt { padding: 2px 4px; font-weight: bold; background: #ddd; } .label-list dd { padding: 2px 12px; } .label-list dd + dt, .note-list dd + dt { margin-top: 0.7em; } #documentation .section { font-size: 90%; } #documentation h2.section-header { margin-top: 1em; padding: 0.25em 0.5em; background: #ccc; color: #333; font-size: 175%; border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } .documentation-section-title { position: relative; } .documentation-section-title .section-click-top { position: absolute; top: 6px; right: 12px; font-size: 10px; color: #9b9877; visibility: hidden; padding-right: 0.5px; } .documentation-section-title:hover .section-click-top { visibility: visible; } #documentation h3.section-header { margin-top: 1em; padding: 0.25em 0.5em; background-color: #dedede; color: #333; font-size: 150%; border: 1px solid #bbb; -moz-border-radius: 3px; -webkit-border-radius: 3px; } #constants-list > dl, #attributes-list > dl { margin: 1em 0 2em; border: 0; } #constants-list > dl dt, #attributes-list > dl dt { padding-left: 0; font-weight: bold; font-family: Monaco, "Andale Mono"; background: inherit; } #constants-list > dl dt a, #attributes-list > dl dt a { color: inherit; } #constants-list > dl dd, #attributes-list > dl dd { margin: 0 0 1em 0; padding: 0; color: #666; } .documentation-section h2 { position: relative; } .documentation-section h2 a { position: absolute; top: 8px; right: 10px; font-size: 12px; color: #9b9877; visibility: hidden; } .documentation-section h2:hover a { visibility: visible; } /* @group Method Details */ #documentation .method-source-code { display: none; } #documentation .method-description .method-calls-super { color: #333; font-weight: bolder; } #documentation .method-detail { margin: 0.5em 0; padding: 0.5em 0; cursor: pointer; } #documentation .method-detail:hover { background-color: #f1edba; } #documentation .method-heading { position: relative; padding: 2px 4px 0 20px; font-size: 125%; font-weight: bold; color: #333; background: url(images/brick.png) no-repeat left bottom; } #documentation .method-heading :link, #documentation .method-heading :visited { color: inherit; } #documentation .method-click-advice { position: absolute; top: 2px; right: 5px; font-size: 10px; color: #9b9877; visibility: hidden; padding-right: 20px; line-height: 20px; background: url(images/zoom.png) no-repeat right top; } #documentation .method-heading:hover .method-click-advice { visibility: visible; } #documentation .method-alias .method-heading { color: #666; background: url(images/brick_link.png) no-repeat left bottom; } #documentation .method-description, #documentation .aliases { margin: 0 20px; color: #666; } #documentation .method-description p, #documentation .aliases p { line-height: 1.2em; } #documentation .aliases { padding-top: 4px; font-style: italic; cursor: default; } #documentation .method-description p { margin-bottom: 0.5em; } #documentation .method-description ul { margin-left: 1.5em; } pre { margin: 0.5em 0; } #documentation .attribute-method-heading { background: url(images/tag_green.png) no-repeat left bottom; } #documentation #attribute-method-details .method-detail:hover { background-color: transparent; cursor: default; } #documentation .attribute-access-type { font-size: 60%; text-transform: uppercase; vertical-align: super; padding: 0 2px; } /* @end */ /* @end */ /* @group Source Code */ pre { overflow: auto; background: #262626; color: white; border: 1px dashed #999; padding: 0.5em; } .description pre { margin: 0 0.4em; } .ruby-constant { color: #7fffd4; background: transparent; } .ruby-keyword { color: #00ffff; background: transparent; } .ruby-ivar { color: #eedd82; background: transparent; } .ruby-operator { color: #00ffee; background: transparent; } .ruby-identifier { color: #ffdead; background: transparent; } .ruby-node { color: #ffa07a; background: transparent; } .ruby-comment { color: #dc0000; font-weight: bold; background: transparent; } .ruby-regexp { color: #ffa07a; background: transparent; } .ruby-value { color: #7fffd4; background: transparent; } /* @end */ /* @group search results */ #search-results h1 { font-size: 1em; font-weight: normal; text-shadow: none; } #search-results .current { background: #ccc; border-bottom: 1px solid transparent; } #search-results li { list-style: none; border-bottom: 1px solid #aaa; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; margin-bottom: 0.5em; } #search-results li:last-child { border-bottom: none; margin-bottom: 0; } #search-results li p { padding: 0; margin: 0.5em; } #search-results .search-namespace { font-weight: bold; } #search-results li em { background: yellow; font-style: normal; } #search-results pre { margin: 0.5em; } /* @end */ PKJ8jZV::*template/darkfish/_sidebar_installed.rhtmlnu[ PKJ8jZ|.>+template/darkfish/_sidebar_navigation.rhtmlnu[ PKJ8jZySftemplate/darkfish/class.rhtmlnu[

<%= klass.type %> <%= klass.full_name %>

<%= klass.description %>
<% klass.each_section do |section, constants, attributes| %> <% constants = constants.select { |const| const.display? } %> <% attributes = attributes.select { |attr| attr.display? } %>
<% if section.title then %>

<%= section.title %>

↑ top
<% end %> <% if section.comment then %>
<%= section.description %>
<% end %> <% unless constants.empty? then %>

Constants

<% constants.each do |const| %>
<%= const.name %> <% if const.comment then %>
<%= const.description.strip %> <% else %>
(Not documented) <% end %> <% end %>
<% end %> <% unless attributes.empty? then %>

Attributes

<% attributes.each do |attrib| %>
<%= h attrib.name %>[<%= attrib.rw %>]
<% if attrib.comment then %> <%= attrib.description.strip %> <% else %>

(Not documented) <% end %>

<% end %>
<% end %> <% klass.methods_by_type(section).each do |type, visibilities| next if visibilities.empty? visibilities.each do |visibility, methods| next if methods.empty? %>

<%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods

<% methods.each do |method| %>
"> <% if method.call_seq then %> <% method.call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
<%= h(call_seq.strip. gsub( /^\w+\./m, '')). gsub(/(.*)[-=]>/, '\1→') %> <% if i == 0 and method.token_stream then %> click to toggle source <% end %>
<% end %> <% else %>
<%= h method.name %><%= method.param_seq %> <% if method.token_stream then %> click to toggle source <% end %>
<% end %>
<% if method.comment then %> <%= method.description.strip %> <% else %>

(Not documented) <% end %> <% if method.calls_super then %>

Calls superclass method <%= method.superclass_method ? method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil %>
<% end %> <% if method.token_stream then %>
<%= method.markup_code %>
<% end %>
<% unless method.aliases.empty? then %>
Also aliased as: <%= method.aliases.map do |aka| if aka.parent then # HACK lib/rexml/encodings %{#{h aka.name}} else h aka.name end end.join ", " %>
<% end %> <% if method.is_alias_for then %> <% end %>
<% end %>
<% end end %>
<% end %>
PKJ8jZ?(template/darkfish/_sidebar_methods.rhtmlnu[<% unless klass.method_list.empty? then %> <% end %> PKJ8jZss)template/darkfish/servlet_not_found.rhtmlnu[

Not Found

The page <%=h path %> was not found

PKJ8jZCCJUU$template/darkfish/images/package.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8}Kh\u{g̝4L)B1>n\F)PAD QTWf!"؍` HC0ijC1ͳLfw(v!g}69)wyc/T4"Գ X8ѫ̛vכ*WGU}[E>7&tJiG+*rQE>{ `=9o/rorgaw=MЪUQVcƏ;}ź;qD>r 7jT1aU&m86l7KVio{Ǥ9sVԨ,O"aWūmptk.h-V}֯K*R\M- Юޡ'O'CU0)79Ms&3P#V 'w'ů N,op#LRi4Qj h]GS\;QƤBH`1@<Ѐd^{9] !"dlǁD @|0mp  Q a+kK7 "$ h$?$BrN#&Cif N7SV[6laL/HbF6tX=ֽɕد}GO|뻗zUC5rh8D>)4Vwͦ|"L\>2FΫ[^yjW?'q{gBio.ȧTctܲ^&IENDB`PKJ8jZ(VV,template/darkfish/images/page_white_text.pngnu[PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT1nSAǞ4A(ISp.KPp"QA7%1Ӣ;+Z######DWk=C?|Xj9昇SekMs9NNVG@kD)4hn.Q@nJ)1]:;1@ T:ti:I$fM-+g]^LvIENDB`PKJ8jZbb#template/darkfish/images/wrench.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˕oQ_[c+W.]хi5  g mJ[Fq#_)qո;,@{;upLTʙH$(Z XMɤni"\nt:}yD 0 \ ږIU4(r HMk̈_4_ziy'"[ n1rM_A`b=$Ik_p-qS~=li~3Bv"qZAԧ̸r[G]<&e!'ڸ67 yq$OX!=_~1Gs~EZQx&qWK3!ޤunkzGrjQnIENDB`PKJ8jZ#۸PP!template/darkfish/images/ruby.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8͓KQ &*z( z24r!\e77V"x!bT7R*c <||:[WAD>9{Li'v%IID=z/;"\k޸)ku9x]2$W0= $QH>}F|`n6ϜϤkN7 >9LL(,.}>ּ^ OMM|%꿏:/T]F$ 6VW))t5FKòQq"rf y_Oa| pHJ*MTX8[^Dr-||[v(33!.44NJebʡrטu͚d+@ S[Ko~TKrjkoraPDPy5@Y?i܅Sg@'˼Zj_M5̻w. ;'5ڿ_IENDB`PKJ8jZ$V(template/darkfish/images/macFFBgHack.pngnu[PNG  IHDRcsBIT|d pHYs  ~tEXtSoftwareAdobe Fireworks CS3FtEXtCreation Time7/16/07Z (IDATHA0!U[ GϱJJJJJJJJJYIENDB`PKJ8jZErr!template/darkfish/images/date.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˕RmkA~ԋK$5X% ǂ!#?P@PZ(*EA#ܹۙw:0;3ϼ@J f?WoL` OZ+M9cktyx D7гm\PSt]Io@#/د)[f^ѻ#dHkbG"uݿq\.Xc8YhH|r}/!FsRB(]jT5V?ZxYl6sd2QgwpdC2p8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B acĪL"JitTy8;(Gx_^[%׎ŷQ麲uan7m QH^eOQu6Su 2%vX ^*l O—ޭˀq,>S%LdB1CZ$M9P 'w\/].r#E|!3>_oa۾d1Zӑz'=~V+cjJtO%mN |-bWO+ o ^ IH.;S]i_s9*p.7U^s.3u |^,<;c=ma>Vt.[՟Ϫ x# ¡_2 pHYs  diTXtXML:com.adobe.xmp Adobe ImageReady z`IDAT8}RMka~vW#j-įV&ZjR B"Q!zR!JA"T ~zi*U̶G_ݝ}gyEQp:::+z2t~&΍o*Lo$d2ee ' V @43H6DX0O@(RmFٍodFɾ͇xUp:<"NTd}\3,@AZrr7! tZWwF_Z>lhRlޢlk1<\ؼ * q:ZUB:{ےܡP@Melۀ^z>:D"1iXZ {e<)iJl En)ev`POydb=;;CX.c k1k&8jר_ d{~?jcfiRԡsbOA9&ydV;8$p.r=XLv}@!OaX,*C;zJnYTaB!^L{n7kIENDB`PKJ8jZh˟ee&template/darkfish/images/tag_green.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˅IaOUÿ {bFcN4FMtn-=6c li4BH!(dX՗.U>BZERA\FTBXDP}!r^C2^@I`&tl $ɝ,S3MD.' 90NCӴY6)F?2m$ b @WH<Nt͐xj D"5v1of^gVfI.lfhě9<VOC|8i4>C8%JlGk8z#SmȉrXZ\@{x<.`^or ŌBx<^'j}U1}QWhT ]"kL|snێ# ~ߢK\}bx'BQ'{i^oPȲz].c)weSL|iW(SIENDB`PKJ8jZ=V0template/darkfish/images/bullet_toggle_minus.pngnu[PNG  IHDR7gAMA7tEXtSoftwareAdobe ImageReadyqe<aIDAT(cπ2Q+/ދEp, %ւ)XC۱)XdB=6PMu][z+_70!IȓzS5IENDB`PKJ8jZAaa(template/darkfish/images/transparent.pngnu[PNG  IHDR%=m"PLTEtRNS@f IDATc` 0zIENDB`PKJ8jZOs~ template/darkfish/images/add.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<oIDAT8˥Ka[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JZyum0}f~3#sL|!!|g-V9Q鎺c`TC8*5bF'R!DЋ kb^sP!Locgע≣.=^u֘[ 65޶FG ! P %wN5\q=(t@ȀѶ(t2)է"L?B2uXcYV$&a]ct< *Q1}E )hYҁ갎6` DXr<:=UR̞O98*}V&b==hցqف+;˜JT<A!C:̼}nAH~0bM36 +/痗sIĢ̾Ek J {v!=_MyKb]öa{6W03)oHH*template/darkfish/images/wrench_orange.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˕kSQ8H)N]uA,wjazcbb6& Qcn^b4b2e l xW }$9Xt:$n"0T8J)N!h4ʉF|p8|2X,f[͵`0S~OZ% } iz=nHXt:4 "BrLRtv_T'-lu&f_uRl6 u]e 5~lޢnz{ejjUiw|}?$&x r|TN%*4Ç l;'T^ٗG <"pFୌw!yhݔeE6  ܙצ PJ:C\DW^,<<4 A ѹ]s6ޑIENDB`PKJ8jZUtt%template/darkfish/images/arrow_up.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<IDAT8˥?/Qϲhg5j%'F,[ LH 3(vw=fcoN{O~9VM4Q7ܿ)v/WQ=&bpSO ^'&^:\˨6eND!& 9꒣_|?\ srx,g*,(F#d[OaAA*P p1O+C$`)*w`A#0$ *?b&NRIENDB`PKJ8jZP#template/darkfish/images/delete.pngnu[PNG  IHDRagAMA7tEXtSoftwareAdobe ImageReadyqe<]IDAT8˥KSa[nQP2wܦγL[,biaA\Cv_2MlZFjסNMjmkʷ`&.#z<ϓ bVPT3%I{GqRivȅ tz#E6EddJ`DR2<]N ;4Ѿ;m>78ɀQe6LIt殷cq!z |v j/Xi@ %1|hl !|! Y#uUNw]˼ H3u t]E>k%IfoRD:0`~ | (r on3oG0!$V *[W0_-+ dW&2ZfMFVJpiF&B > Rg- ~ CmڴER ឫ p5ްy+21Kawh` #aZ񽞆TZoLѓ`"(?'ˎJvKކ|:G9[aw82 Jw f'ymzsӘTsw__ιIrIENDB`PKJ8jZn=)template/darkfish/_sidebar_includes.rhtmlnu[<% unless klass.includes.empty? then %> <% end %> PKJ8jZC00(template/darkfish/_sidebar_classes.rhtmlnu[ PKJ8jZq"template/json_index/js/searcher.jsnu[Searcher = function(data) { this.data = data; this.handlers = []; } Searcher.prototype = new function() { // search is performed in chunks of 1000 for non-blocking user input var CHUNK_SIZE = 1000; // do not try to find more than 100 results var MAX_RESULTS = 100; var huid = 1; var suid = 1; var runs = 0; this.find = function(query) { var queries = splitQuery(query); var regexps = buildRegexps(queries); var highlighters = buildHilighters(queries); var state = { from: 0, pass: 0, limit: MAX_RESULTS, n: suid++}; var _this = this; this.currentSuid = state.n; if (!query) return; var run = function() { // stop current search thread if new search started if (state.n != _this.currentSuid) return; var results = performSearch(_this.data, regexps, queries, highlighters, state); var hasMore = (state.limit > 0 && state.pass < 4); triggerResults.call(_this, results, !hasMore); if (hasMore) { setTimeout(run, 2); } runs++; }; runs = 0; // start search thread run(); } /* ----- Events ------ */ this.ready = function(fn) { fn.huid = huid; this.handlers.push(fn); } /* ----- Utilities ------ */ function splitQuery(query) { return jQuery.grep(query.split(/(\s+|::?|\(\)?)/), function(string) { return string.match(/\S/) }); } function buildRegexps(queries) { return jQuery.map(queries, function(query) { return new RegExp(query.replace(/(.)/g, '([$1])([^$1]*?)'), 'i') }); } function buildHilighters(queries) { return jQuery.map(queries, function(query) { return jQuery.map(query.split(''), function(l, i) { return '\u0001$' + (i*2+1) + '\u0002$' + (i*2+2); }).join(''); }); } // function longMatchRegexp(index, longIndex, regexps) { // for (var i = regexps.length - 1; i >= 0; i--){ // if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; // }; // return true; // } /* ----- Mathchers ------ */ /* * This record matches if the index starts with queries[0] and the record * matches all of the regexps */ function matchPassBeginning(index, longIndex, queries, regexps) { if (index.indexOf(queries[0]) != 0) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; }; return true; } /* * This record matches if the longIndex starts with queries[0] and the * longIndex matches all of the regexps */ function matchPassLongIndex(index, longIndex, queries, regexps) { if (longIndex.indexOf(queries[0]) != 0) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!longIndex.match(regexps[i])) return false; }; return true; } /* * This record matches if the index contains queries[0] and the record * matches all of the regexps */ function matchPassContains(index, longIndex, queries, regexps) { if (index.indexOf(queries[0]) == -1) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; }; return true; } /* * This record matches if regexps[0] matches the index and the record * matches all of the regexps */ function matchPassRegexp(index, longIndex, queries, regexps) { if (!index.match(regexps[0])) return false; for (var i=1, l = regexps.length; i < l; i++) { if (!index.match(regexps[i]) && !longIndex.match(regexps[i])) return false; }; return true; } /* ----- Highlighters ------ */ function highlightRegexp(info, queries, regexps, highlighters) { var result = createResult(info); for (var i=0, l = regexps.length; i < l; i++) { result.title = result.title.replace(regexps[i], highlighters[i]); result.namespace = result.namespace.replace(regexps[i], highlighters[i]); }; return result; } function hltSubstring(string, pos, length) { return string.substring(0, pos) + '\u0001' + string.substring(pos, pos + length) + '\u0002' + string.substring(pos + length); } function highlightQuery(info, queries, regexps, highlighters) { var result = createResult(info); var pos = 0; var lcTitle = result.title.toLowerCase(); pos = lcTitle.indexOf(queries[0]); if (pos != -1) { result.title = hltSubstring(result.title, pos, queries[0].length); } result.namespace = result.namespace.replace(regexps[0], highlighters[0]); for (var i=1, l = regexps.length; i < l; i++) { result.title = result.title.replace(regexps[i], highlighters[i]); result.namespace = result.namespace.replace(regexps[i], highlighters[i]); }; return result; } function createResult(info) { var result = {}; result.title = info[0]; result.namespace = info[1]; result.path = info[2]; result.params = info[3]; result.snippet = info[4]; return result; } /* ----- Searching ------ */ function performSearch(data, regexps, queries, highlighters, state) { var searchIndex = data.searchIndex; var longSearchIndex = data.longSearchIndex; var info = data.info; var result = []; var i = state.from; var l = searchIndex.length; var togo = CHUNK_SIZE; var matchFunc, hltFunc; while (state.pass < 4 && state.limit > 0 && togo > 0) { if (state.pass == 0) { matchFunc = matchPassBeginning; hltFunc = highlightQuery; } else if (state.pass == 1) { matchFunc = matchPassLongIndex; hltFunc = highlightQuery; } else if (state.pass == 2) { matchFunc = matchPassContains; hltFunc = highlightQuery; } else if (state.pass == 3) { matchFunc = matchPassRegexp; hltFunc = highlightRegexp; } for (; togo > 0 && i < l && state.limit > 0; i++, togo--) { if (info[i].n == state.n) continue; if (matchFunc(searchIndex[i], longSearchIndex[i], queries, regexps)) { info[i].n = state.n; result.push(hltFunc(info[i], queries, regexps, highlighters)); state.limit--; } }; if (searchIndex.length <= i) { state.pass++; i = state.from = 0; } else { state.from = i; } } return result; } function triggerResults(results, isLast) { jQuery.each(this.handlers, function(i, fn) { fn.call(this, results, isLast) }) } } PKJ8jZ .COO$template/json_index/js/navigation.jsnu[/* * Navigation allows movement using the arrow keys through the search results. * * When using this library you will need to set scrollIntoView to the * appropriate function for your layout. Use scrollInWindow if the container * is not scrollable and scrollInElement if the container is a separate * scrolling region. */ Navigation = new function() { this.initNavigation = function() { var _this = this; $(document).keydown(function(e) { _this.onkeydown(e); }).keyup(function(e) { _this.onkeyup(e); }); this.navigationActive = true; } this.setNavigationActive = function(state) { this.navigationActive = state; this.clearMoveTimeout(); } this.onkeyup = function(e) { if (!this.navigationActive) return; switch(e.keyCode) { case 37: //Event.KEY_LEFT: case 38: //Event.KEY_UP: case 39: //Event.KEY_RIGHT: case 40: //Event.KEY_DOWN: this.clearMoveTimeout(); break; } } this.onkeydown = function(e) { if (!this.navigationActive) return; switch(e.keyCode) { case 37: //Event.KEY_LEFT: if (this.moveLeft()) e.preventDefault(); break; case 38: //Event.KEY_UP: if (e.keyCode == 38 || e.ctrlKey) { if (this.moveUp()) e.preventDefault(); this.startMoveTimeout(false); } break; case 39: //Event.KEY_RIGHT: if (this.moveRight()) e.preventDefault(); break; case 40: //Event.KEY_DOWN: if (e.keyCode == 40 || e.ctrlKey) { if (this.moveDown()) e.preventDefault(); this.startMoveTimeout(true); } break; case 13: //Event.KEY_RETURN: if (this.$current) e.preventDefault(); this.select(this.$current); break; } if (e.ctrlKey && e.shiftKey) this.select(this.$current); } this.clearMoveTimeout = function() { clearTimeout(this.moveTimeout); this.moveTimeout = null; } this.startMoveTimeout = function(isDown) { if (!$.browser.mozilla && !$.browser.opera) return; if (this.moveTimeout) this.clearMoveTimeout(); var _this = this; var go = function() { if (!_this.moveTimeout) return; _this[isDown ? 'moveDown' : 'moveUp'](); _this.moveTimout = setTimeout(go, 100); } this.moveTimeout = setTimeout(go, 200); } this.moveRight = function() { } this.moveLeft = function() { } this.move = function(isDown) { } this.moveUp = function() { return this.move(false); } this.moveDown = function() { return this.move(true); } /* * Scrolls to the given element in the scrollable element view. */ this.scrollInElement = function(element, view) { var offset, viewHeight, viewScroll, height; offset = element.offsetTop; height = element.offsetHeight; viewHeight = view.offsetHeight; viewScroll = view.scrollTop; if (offset - viewScroll + height > viewHeight) { view.scrollTop = offset - viewHeight + height; } if (offset < viewScroll) { view.scrollTop = offset; } } /* * Scrolls to the given element in the window. The second argument is * ignored */ this.scrollInWindow = function(element, ignored) { var offset, viewHeight, viewScroll, height; offset = element.offsetTop; height = element.offsetHeight; viewHeight = window.innerHeight; viewScroll = window.scrollY; if (offset - viewScroll + height > viewHeight) { window.scrollTo(window.scrollX, offset - viewHeight + height); } if (offset < viewScroll) { window.scrollTo(window.scrollX, offset); } } } PKJ8jZG˸ markup.rbnu[## # Handle common RDoc::Markup tasks for various CodeObjects # # This module is loaded by generators. It allows RDoc's CodeObject tree to # avoid loading generator code to improve startup time for +ri+. module RDoc::Generator::Markup ## # Generates a relative URL from this object's path to +target_path+ def aref_to(target_path) RDoc::Markup::ToHtml.gen_relative_url path, target_path end ## # Generates a relative URL from +from_path+ to this object's path def as_href(from_path) RDoc::Markup::ToHtml.gen_relative_url from_path, path end ## # Handy wrapper for marking up this object's comment def description markup @comment end ## # Creates an RDoc::Markup::ToHtmlCrossref formatter def formatter return @formatter if defined? @formatter options = @store.rdoc.options this = RDoc::Context === self ? self : @parent @formatter = RDoc::Markup::ToHtmlCrossref.new options, this.path, this @formatter.code_object = self @formatter end ## # Build a webcvs URL starting for the given +url+ with +full_path+ appended # as the destination path. If +url+ contains '%s' +full_path+ will be # will replace the %s using sprintf on the +url+. def cvs_url(url, full_path) if /%s/ =~ url then sprintf url, full_path else url + full_path end end end class RDoc::CodeObject include RDoc::Generator::Markup end class RDoc::MethodAttr @add_line_numbers = false class << self ## # Allows controlling whether #markup_code adds line numbers to # the source code. attr_accessor :add_line_numbers end ## # Prepend +src+ with line numbers. Relies on the first line of a source # code listing having: # # # File xxxxx, line dddd # # If it has this comment then line numbers are added to +src+ and the , # line dddd portion of the comment is removed. def add_line_numbers(src) return unless src.sub!(/\A(.*)(, line (\d+))/, '\1') first = $3.to_i - 1 last = first + src.count("\n") size = last.to_s.length line = first src.gsub!(/^/) do res = if line == first then " " * (size + 1) else "%2$*1$d " % [size, line] end line += 1 res end end ## # Turns the method's token stream into HTML. # # Prepends line numbers if +add_line_numbers+ is true. def markup_code return '' unless @token_stream src = RDoc::TokenStream.to_html @token_stream # dedent the source indent = src.length lines = src.lines.to_a lines.shift if src =~ /\A.*#\ *File/i # remove '# File' comment lines.each do |line| if line =~ /^ *(?=\S)/ n = $&.length indent = n if n < indent break if n == 0 end end src.gsub!(/^#{' ' * indent}/, '') if indent > 0 add_line_numbers(src) if RDoc::MethodAttr.add_line_numbers src end end class RDoc::ClassModule ## # Handy wrapper for marking up this class or module's comment def description markup @comment_location end end class RDoc::Context::Section include RDoc::Generator::Markup end class RDoc::TopLevel ## # Returns a URL for this source file on some web repository. Use the -W # command line option to set. def cvs_url url = @store.rdoc.options.webcvs if /%s/ =~ url then url % @relative_name else url + @relative_name end end end PKJ8jZoJJ darkfish.rbnu[PKJ8jZsoxKri.rbnu[PKJ8jZ 5 Ljson_index.rbnu[PKJ8jZ9YB B etemplate/darkfish/js/search.jsnu[PKJ8jZY, otemplate/darkfish/js/darkfish.jsnu[PKJ8jZ |;fftemplate/darkfish/js/jquery.jsnu[PKJ8jZxƛ'Xtemplate/darkfish/_sidebar_search.rhtmlnu[PKJ8jZ8ZZJtemplate/darkfish/_footer.rhtmlnu[PKJ8jZPm(template/darkfish/_sidebar_extends.rhtmlnu[PKJ8jZ}4dd& template/darkfish/_sidebar_pages.rhtmlnu[PKJ8jZ^J6;;$template/darkfish/servlet_root.rhtmlnu[PKJ8jZCRTtemplate/darkfish/index.rhtmlnu[PKJ8jZLHtemplate/darkfish/page.rhtmlnu[PKJ8jZ``)etemplate/darkfish/table_of_contents.rhtmlnu[PKJ8jZ%zо)template/darkfish/_sidebar_in_files.rhtmlnu[PKJ8jZ ==)5template/darkfish/_sidebar_sections.rhtmlnu[PKJ8jZvʵ2template/darkfish/_sidebar_table_of_contents.rhtmlnu[PKJ8jZGL1template/darkfish/_head.rhtmlnu[PKJ8jZ$v)template/darkfish/_sidebar_VCS_info.rhtmlnu[PKJ8jZ:}(}(< template/darkfish/rdoc.cssnu[PKJ8jZV::*3template/darkfish/_sidebar_installed.rhtmlnu[PKJ8jZ|.>+4template/darkfish/_sidebar_navigation.rhtmlnu[PKJ8jZySf6template/darkfish/class.rhtmlnu[PKJ8jZ?(Mtemplate/darkfish/_sidebar_methods.rhtmlnu[PKJ8jZss)Otemplate/darkfish/servlet_not_found.rhtmlnu[PKJ8jZCCJUU$Qtemplate/darkfish/images/package.pngnu[PKJ8jZ(VV,^Utemplate/darkfish/images/page_white_text.pngnu[PKJ8jZbb#Wtemplate/darkfish/images/wrench.pngnu[PKJ8jZ#۸PP!Ytemplate/darkfish/images/ruby.pngnu[PKJ8jZ$V(f\template/darkfish/images/macFFBgHack.pngnu[PKJ8jZErr!]template/darkfish/images/date.pngnu[PKJ8jZQ-P`template/darkfish/images/loadingAnimation.gifnu[PKJ8jZ(?Y)wtemplate/darkfish/images/bullet_black.pngnu[PKJ8jZ OO#xtemplate/darkfish/images/plugin.pngnu[PKJ8jZ=k/y{template/darkfish/images/bullet_toggle_plus.pngnu[PKJ8jZZmm'|template/darkfish/images/page_green.pngnu[PKJ8jZJ!mtemplate/darkfish/images/find.pngnu[PKJ8jZR7'Qtemplate/darkfish/images/brick_link.pngnu[PKJ8jZ"55-template/darkfish/images/page_white_width.pngnu[PKJ8jZ)oHH*$template/darkfish/images/wrench_orange.pngnu[PKJ8jZUtt%ơtemplate/darkfish/images/arrow_up.pngnu[PKJ8jZP#template/darkfish/images/delete.pngnu[PKJ8jZn=)template/darkfish/_sidebar_includes.rhtmlnu[PKJ8jZC00(template/darkfish/_sidebar_classes.rhtmlnu[PKJ8jZq"qtemplate/json_index/js/searcher.jsnu[PKJ8jZ .COO$template/json_index/js/navigation.jsnu[PKJ8jZG˸ 1markup.rbnu[PK88"