Parent
- Generator
Methods
Included Modules
Class Index
![show/hide quicksearch [+]](../../assets/icon/find.png)
- WebRI
- WebRI::Blackfish
- WebRI::Component
- WebRI::Generator
- WebRI::GeneratorOne
- WebRI::GitHub
- WebRI::Heirarchy
- WebRI::Highlight
- WebRI::Icons
- WebRI::JSONFile
- WebRI::Longfish
- WebRI::Metadata
- WebRI::Newfish
- WebRI::Oldfish
- WebRI::Onefish
- WebRI::Prettify
- WebRI::Redfish
- WebRI::RiService
- WebRI::Search
- WebRI::Search::FilesTree
- WebRI::Server
- WebRI::Subversion
- WebRI::Template
- WebRI::TimeDelta
- WebRI::Twofish
- RDoc
- RDoc::AnyMethod
- RDoc::ClassModule
- RDoc::Options
- RDoc::Parser
- RDoc::Parser::C
- RDoc::TopLevel
- Syckle
- Syckle::Plugins
- Syckle::Plugins::WebRI
- Object
- OpEsc
Longfish Template
The Longfish tempolate is based on John Long’s design of the ruby-lang.org website. It was built to supply Ruby core and stadard documentation with an “offical” look, but there’s no reason you can’t use it for your project too, if you prefer it.
Public Instance Methods
index_description()
click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 55 def index_description @index_description ||= parse_index_header[1] end
index_title()
click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 49 def index_title @index_title ||= parse_index_header[0] end
parse_index_header()
click to toggle source
TODO: Generalize for all generators (?)
# File lib/webri/generators/longfish/generator.rb, line 61 def parse_index_header if options.main_page && main_page = files_toplevel.find { |f| f.full_name == options.main_page } desc = main_page.description if md = /^\s*\<h1\>(.*?)\<\/h1\>/.match(desc) title = md[1] desc = md.post_match else title = options.main_page end else title = options.title desc = "This is the API documentation for '#{title}'." end return title, desc end
path()
click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 23 def path @path ||= Pathname.new(__FILE__).parent end
site_community()
click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 33 def site_community metadata.mailinglist || metadata.wiki end
site_homepage()
click to toggle source
# File lib/webri/generators/longfish/generator.rb, line 28 def site_homepage metadata.homepage end
Disabled; run with --debug to generate this.