# File lib/yard/server/commands/display_object_command.rb, line 8 def run if path.empty? if options.readme filename = options.readme.filename opts = adapter.options.merge( :index => true, :library => library, :path => filename.sub(%r{^#{library.source_path.to_s}/}, '')) self.status, self.headers, self.body = *DisplayFileCommand.new(opts).call(request) cache(self.body) return else self.path = 'index' end end return index if path == 'index' if object = Registry.at(object_path) options.update(:type => :layout) render(object) else not_found end end