Sha256: 41285cdd4027b70563a14cc2ac2d61715737cac958ca8b88e84619be637e3910
Contents?: true
Size: 447 Bytes
Versions: 7
Compression:
Stored size: 447 Bytes
Contents
def create_mac_executable(input_file) def read_file_line_by_line(input_path) file_id = open(input_path) file_line_by_line = file_id.readlines() file_id.close return file_line_by_line end mac_file_contents = ["#!/usr/bin/env ruby\n\n"] + read_file_line_by_line(input_file) mac_file_path = input_file.sub(".rb", "") file_id = open(mac_file_path, "w") file_id.write(mac_file_contents.join) file_id.close end
Version data entries
7 entries across 7 versions & 1 rubygems