lib/yard/server/commands/display_object_command.rb in yard-0.6.8 vs lib/yard/server/commands/display_object_command.rb in yard-0.7.0

- old
+ new

@@ -3,19 +3,19 @@ module Commands # Displays documentation for a specific object identified by the path class DisplayObjectCommand < LibraryCommand def run return index if path.empty? - + if object = Registry.at(object_path) options.update(:type => :layout) render(object) else self.status = 404 end end - + def index Registry.load_all title = options[:title] unless title @@ -27,17 +27,17 @@ :title => title, :type => :layout ) render end - + def not_found super self.body = "Could not find object: #{object_path}" end - + private - + def object_path return @object_path if @object_path if path == "toplevel" @object_path = :root else