Class: YARD::Server::Commands::DisplayObjectCommand
- Inherits:
-
LibraryCommand
- Object
- Base
- LibraryCommand
- YARD::Server::Commands::DisplayObjectCommand
- Defined in:
- lib/yard/server/commands/display_object_command.rb
Overview
Displays documentation for a specific object identified by the path
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from LibraryCommand
#incremental, #library, #options, #serializer, #single_library
Attributes inherited from Base
#adapter, #body, #caching, #command_options, #headers, #path, #request, #status
Instance Method Summary collapse
Methods inherited from LibraryCommand
Methods inherited from Base
#cache, #call, #initialize, #redirect, #render
Constructor Details
This class inherits a constructor from YARD::Server::Commands::LibraryCommand
Instance Method Details
#index ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/yard/server/commands/display_object_command.rb', line 17 def index Registry.load_all title = [:title] unless title title = "Documentation for #{library.name} #{library.version ? '(' + library.version + ')' : ''}" end .update( :object => '_index.html', :objects => Registry.all(:module, :class), :title => title, :type => :layout ) render end |
#not_found ⇒ Object
33 34 35 36 |
# File 'lib/yard/server/commands/display_object_command.rb', line 33 def not_found super self.body = "Could not find object: #{object_path}" end |