<%- if @newline_before %> <% end -%> <% if @comment -%> <%= @comment.gsub(/(.{1,78})( +|$\n?)|(.{1,78})/, "# \\1\\3\n") -%> <%- end -%> <%- def format_parameter(param, value) if [true, false].include? value return "#{value ? "" : "!"}#{param}" elsif value.is_a?(String) return "#{param}=\"#{@value}\"" else return "#{param}=#{@value}" end end def context_list(context, list) if context == "global" return "" else @CMAP = { "host" => '@', "user" => ':', "cmnd" => '!', "runas" => '>' } return "#{@CMAP[context]}#{list.join(',')}" end end -%> Defaults<%= context_list(@context, @_list) %> <%= format_parameter(@param, @value) %>