# File lib/brakeman/processors/output_processor.rb, line 61 def process_defn exp # Copied from Ruby2Ruby except without the whole # "convert methods to attr_*" stuff exp = exp.deep_clone exp.shift name = exp.shift args = process exp.shift args = "" if args == "()" exp.shift if exp == s(s(:nil)) # empty it out of a default nil expression body = [] until exp.empty? do body << indent(process(exp.shift)) end body << indent("# do nothing") if body.empty? body = body.join("\n") return "def #{name}#{args}\n#{body}\nend".gsub(/\n\s*\n+/, "\n") end