File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,19 @@ class Doc
19
19
20
20
def file_content ( filename )
21
21
@fc ||= { }
22
- return @fc [ filename ] if @fc . key? ( filename )
23
-
24
- comments = [ ]
25
- IO . readlines ( filename ) . each do | line |
26
- next if line =~ /^# \s *@/
27
- next if line . strip == '# frozen_string_literal: true'
28
- if line =~ /^#(.+)/
29
- comments << Regexp . last_match ( 1 ) . strip
30
- elsif line =~ /^OctocatalogDiff::/
31
- break
22
+ @fc [ filename ] ||= begin
23
+ comments = [ ]
24
+ IO . readlines ( filename ) . each do | line |
25
+ next if line =~ /^# \s *@/
26
+ next if line . strip == '# frozen_string_literal: true'
27
+ if line =~ /^#(.+)/
28
+ comments << Regexp . last_match ( 1 ) . strip
29
+ elsif line =~ /^OctocatalogDiff::/
30
+ break
31
+ end
32
32
end
33
+ comments . join ( "\n " )
33
34
end
34
- @fc [ filename ] = comments . join ( "\n " )
35
35
end
36
36
37
37
def initialize
You can’t perform that action at this time.
0 commit comments