# File lib/method_source.rb, line 57 def self.comment_helper(source_location) return nil if !source_location.is_a?(Array) file_name, line = source_location File.open(file_name) do |file| buffer = "" (line - 1).times do line = file.readline # Add any line that is a valid ruby comment, # but clear as soon as we hit a non comment line. if (line =~ /^\s*#/) || (line =~ /^\s*$/) buffer << line.lstrip else buffer.replace("") end end buffer end end