fb880576a6
- fix tests related to whitespace changes
15 lines
381 B
Text
15 lines
381 B
Text
map <%= @string %> $<%= @name %> {
|
|
<% if @hostnames -%>
|
|
hostnames;
|
|
<% end -%>
|
|
<% if @default -%>
|
|
default <%= @default %>;
|
|
<% end -%>
|
|
|
|
<% if @mappings -%>
|
|
<%- field_width = @mappings.inject(0) { |l,(k,v)| k.size > l ? k.size : l } -%>
|
|
<%- @mappings.sort_by{|k,v| k}.each do |key,value| -%>
|
|
<%= sprintf("%-*s", field_width, key) %> <%= value %>;
|
|
<%- end -%>
|
|
<% end -%>
|
|
}
|