vendor/gems/BlueCloth-1.0.0/utils.rb
### Given a documentation <tt>catalogFile</tt>, try extracting the given
### +keyword+'s value from it. Keywords are lines that look like:
###   # <keyword>: <value>
### Returns +nil+ if the catalog file was unreadable or didn't contain the
### specified +keyword+.
Given a documentation catalogFile, try extracting the given
+keyword+'s value from it. Keywords are lines that look like:
: 
Returns +nil+ if the catalog file was unreadable or didn't contain the
specified +keyword+.
Given a documentation catalogFile try extracting the given + keyword + ' s value from it . Keywords are lines that look like : : Returns + nil + if the catalog file was unreadable or didn ' t contain the specified + keyword + .
def findCatalogKeyword( keyword, catalogFile="docs/CATALOG" )
		val = nil
		if File::exists? catalogFile
			message "Extracting '#{keyword}' from CATALOG file (%s).\n" % catalogFile
			File::foreach( catalogFile ) {|line|
				debugMsg( "Examining line #{line.inspect}..." )
				val = $1.strip and break if /^#\s*#{keyword}:\s*(.*)$/i =~ line
			}
		end
		return val
	end
def findCatalogKeyword ( keyword , catalogFile = "docs/CATALOG" ) val = nil if File :: exists? catalogFile message "Extracting '#{keyword}' from CATALOG file (%s).\n" % catalogFile File :: foreach ( catalogFile ) { | line | debugMsg ( "Examining line #{line.inspect}..." ) val = $1 . strip and break if / ^# \s * #{ keyword } : \s *(.*)$ /i =~ line } end return val end
Given a documentation <tt>catalogFile</tt>, try extracting the given
+keyword+'s value from it.
Given a documentation <tt > catalogFile< / tt > try extracting the given + keyword + ' s value from it .
keyword
<not_specific>
catalogFile
<not_specific>