# File lib/review/tocparser.rb, line 175 def initialize(level, label, path = nil) super() @level = level @label = label @filename = (path ? real_filename(path) : nil) end
# File lib/review/tocparser.rb, line 194 def estimated_lines @children.inject(0) {|sum, n| sum + n.estimated_lines } end
# File lib/review/tocparser.rb, line 202 def inspect "\#<#{self.class} level=#{@level} #{@label}>" end
# File lib/review/tocparser.rb, line 198 def yield_section yield self end
# File lib/review/tocparser.rb, line 182 def real_filename(path) if FileTest.symlink?(path) File.basename(File.readlink(path)) else File.basename(path) end end