Method: Babelish::XcodeMacros#write_content

Defined in:
lib/babelish/xcode_macros.rb

#write_content(file_path) ⇒ Object



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/babelish/xcode_macros.rb', line 33

def write_content(file_path)
  header = String.new("//\n//  file_path\n//  \n//  This file was generated by Babelish\n//  \n//  https://github.com/netbe/babelish\n//\n    EOS\n  header.gsub! \"file_path\", File.basename(file_path)\n  file = File.new(file_path, \"w\")\n  file.write header + @content\n  file.close\nend\n")