Module: Tlb::Util

Defined in:
lib/tlb/util.rb

Class Method Summary collapse

Class Method Details

.quote_path(*fragments) ⇒ Object



4
5
6
# File 'lib/tlb/util.rb', line 4

def self.quote_path *fragments
  single_quote(File.expand_path(File.join(*fragments)))
end

.single_quote(arg) ⇒ Object



8
9
10
# File 'lib/tlb/util.rb', line 8

def self.single_quote arg
  "'#{arg.gsub(/'/, "\\'")}'"
end