lib/yard/server/commands/frames_command.rb in yard-0.7.5 vs lib/yard/server/commands/frames_command.rb in yard-0.8.0

- old
+ new

@@ -1,31 +1,14 @@ module YARD module Server module Commands # Displays an object wrapped in frames class FramesCommand < DisplayObjectCommand - include DocServerHelper - def run - main_url = request.path.gsub(/^(.+)?\/frames(?:\/(#{path}))?$/, '\1/\2') - if path =~ %r{^file/} - page_title = "File: #{$'}" - elsif !path.empty? - page_title = "Object: #{object_path}" - elsif options[:files] && options[:files].size > 0 - page_title = "File: #{File.basename(options[:files].first.path)}" - main_url = url_for_file(options[:files].first) - elsif !path || path.empty? - page_title = "Documentation for #{library.name} #{library.version ? '(' + library.version + ')' : ''}" - end - - options.update( - :page_title => page_title, - :main_url => main_url, - :template => :doc_server, - :type => :frames - ) - render + options.update(:frames => true, :type => :fulldoc) + tpl = fulldoc_template + tpl.generate_frameset + cache(tpl.contents) end end end end end