module Ninja
This module is essentially a Ruby-port of ninja_syntax.py (github.com/martine/ninja/blob/master/misc/ninja_syntax.py)
Public Instance Methods
escape(string)
click to toggle source
# File lib/ninja.rb, line 9 def escape(string) raise 'Ninja syntax does not allow newlines' if string.find_index("\n") string.gsub('$', '$$') end
escape_path(word)
click to toggle source
# File lib/ninja.rb, line 5 def escape_path(word) word.gsub('$', '$$').gsub(' ', '$ ').gsub(':', '$:') end