Parent
Class Index
- 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
C
Public Instance Methods
find_class_comment(class_name, class_meth)
click to toggle source
(Not documented)
# File lib/rdoc/c_parser_fix.rb, line 7 def find_class_comment(class_name, class_meth) comment = nil if @content =~ %r{((?>/\*.*?\*/\s+)) (static\s+)?void\s+Init_#{class_name}\s*(?:_\(\s*)?\(\s*(?:void\s*)\)}xmi then comment = $1 elsif @content =~ %r{Document-(?:class|module):\s#{class_name}\s*?(?:<\s+[:,\w]+)?\n((?>.*?\*/))}m comment = $1 else if @content =~ /rb_define_(class|module)/m then class_name = class_name.split("::").last comments = [] @content.split(/(\/\*.*?\*\/)\s*?\n/m).each_with_index do |chunk, index| comments[index] = chunk if chunk =~ /rb_define_(class|module).*?"(#{class_name})"/m then comment = comments[index-1] break end end end end class_meth.comment = mangle_comment(comment) if comment end
find_class_comment(class_name, class_meth)
click to toggle source
(Not documented)
# File lib/webri/extensions/rdoc.rb, line 7 def find_class_comment(class_name, class_meth) comment = nil if @content =~ %r{((?>/\*.*?\*/\s+)) (static\s+)?void\s+Init_#{class_name}\s*(?:_\(\s*)?\(\s*(?:void\s*)\)}xmi then comment = $1 elsif @content =~ %r{Document-(?:class|module):\s#{class_name}\s*?(?:<\s+[:,\w]+)?\n((?>.*?\*/))}m comment = $1 else if @content =~ /rb_define_(class|module)/m then class_name = class_name.split("::").last comments = [] @content.split(/(\/\*.*?\*\/)\s*?\n/m).each_with_index do |chunk, index| comments[index] = chunk if chunk =~ /rb_define_(class|module).*?"(#{class_name})"/m then comment = comments[index-1] break end end end end class_meth.comment = mangle_comment(comment) if comment end
Disabled; run with --debug to generate this.