8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/sdoc/c_parser_fix.rb', line 8
def (class_name, class_meth)
= nil
if @content =~ %r{((?>/\*.*?\*/\s+))
(static\s+)?void\s+Init_#{class_name}\s*(?:_\(\s*)?\(\s*(?:void\s*)\)}xmi then
= $1
elsif @content =~ %r{Document-(?:class|module):\s#{class_name}\s*?(?:<\s+[:,\w]+)?\n((?>.*?\*/))}m
= $1
else
if @content =~ /rb_define_(class|module)/m then
class_name = class_name.split("::").last
= []
@content.split(/(\/\*.*?\*\/)\s*?\n/m).each_with_index do |chunk, index|
[index] = chunk
if chunk =~ /rb_define_(class|module).*?"(#{class_name})"/m then
= [index-1]
break
end
end
end
end
class_meth. = () if
end
|