apache-config-generator/lib/apache/quoteize.rb

17 lines
358 B
Ruby
Raw Normal View History

2010-05-04 15:48:59 +00:00
module Apache
2010-05-10 19:57:34 +00:00
# Add quotes around parameters as needed
2010-05-04 15:48:59 +00:00
module Quoteize
2010-05-10 19:57:34 +00:00
# Add quotes around most parameters, and don't add quotes around Symbols
2010-05-04 15:48:59 +00:00
def quoteize(*args)
args.collect do |arg|
case arg
when Symbol
arg.to_s.gsub('_', ' ')
else
%{"#{arg}"}
end
end
end
end
end