global
def self.source_for method
def self.source_for method path, line = method.source_location file = cache[path] ||= File.readlines(path) ruby = +"" file[line-1..].each do |l| ruby << l return ruby if Prism.parse_success? ruby end nil end
def self.source_for method path, line = method.source_location file = cache[path] ||= File.readlines(path) ruby = +"" file[line-1..].each do |l| ruby << l return ruby if Prism.parse_success? ruby end nil end