vendor/gems/BlueCloth-1.0.0/utils.rb
### Given a documentation <tt>catalogFile</tt>, extract the title, if
### available, and return it. Otherwise generate a title from the name of
### the CVS module.
Given a documentation catalogFile, extract the title, if
available, and return it. Otherwise generate a title from the name of
the CVS module.
Given a documentation catalogFile extract the title if available and return it . Otherwise generate a title from the name of the CVS module .
def findRdocTitle( catalogFile="docs/CATALOG" )
		title = findCatalogKeyword( 'title', catalogFile )
		if title.nil? && File::directory?( "CVS" ) &&
				File::exists?( "CVS/Repository" )
			title = File::read( "CVS/Repository" ).chomp
		end
		if title.nil?
			distdir = File::dirname( __FILE__ )
			distdir = File::dirname( distdir ) if /docs$/ =~ distdir
			title = File::basename( distdir )
		end
		return title
	end
def findRdocTitle ( catalogFile = "docs/CATALOG" ) title = findCatalogKeyword ( 'title' , catalogFile ) if title . nil? && File :: directory? ( "CVS" ) && File :: exists? ( "CVS/Repository" ) title = File :: read ( "CVS/Repository" ) . chomp end if title . nil? distdir = File :: dirname ( __FILE__ ) distdir = File :: dirname ( distdir ) if / docs$ / =~ distdir title = File :: basename ( distdir ) end return title end
Given a documentation <tt>catalogFile</tt>, extract the title, if
available, and return it.
Given a documentation <tt > catalogFile< / tt > extract the title if available and return it .
# Try extracting it from the CATALOG file from a line that looks like: # Title: Foo Bar Module # If that doesn't work for some reason, try grabbing the name of the CVS # repository the directory belongs to. # As a last resort, use the name of the project directory
catalogFile
<not_specific>