Sha256: c8ec9033a7fe720c50177b71080be01feaa33ccc47a5ada22af2a5bb2448d437
Contents?: true
Size: 488 Bytes
Versions: 4
Compression:
Stored size: 488 Bytes
Contents
def extract_parsable_file(input_file_contents) input_file_contents = input_file_contents.collect {|element| element.gsub(".?",".exist?")} reversed_file_contents = input_file_contents.reverse line_counter = 0 if input_file_contents.join.include?("__END__") while !reversed_file_contents[line_counter].strip.include?("__END__") line_counter += 1 end return_contents = input_file_contents[0...-1*line_counter-1] else input_file_contents end end
Version data entries
4 entries across 4 versions & 1 rubygems