2015-12-01 13:19:18 +00:00
|
|
|
<match <%= @pattern %>>
|
|
|
|
<% @config.each do |key, val| -%>
|
2017-11-11 11:40:33 +00:00
|
|
|
<%- if key == 'buffer_chunk_keys'; next; end-%>
|
2017-08-04 09:16:31 +00:00
|
|
|
<%- if val.is_a?( Hash ) -%>
|
2017-11-11 11:40:33 +00:00
|
|
|
<<%= key -%><%- if key == 'buffer' && !@config['buffer_chunk_keys'].nil? -%> <%= @config['buffer_chunk_keys'] -%><%- end -%>>
|
2017-08-04 09:16:31 +00:00
|
|
|
<%- val.each do |key, val| -%>
|
|
|
|
<%= key -%> <%= val %>
|
|
|
|
<%- end -%>
|
|
|
|
</<%= key %>>
|
|
|
|
<%- elsif val.is_a?( Array ) -%>
|
|
|
|
<%- val.each do |k, v| -%>
|
|
|
|
<<%= key -%>>
|
|
|
|
<%- if k.is_a?( Hash ) -%>
|
|
|
|
<%- k.each do |x, y| -%>
|
|
|
|
<%- if y.is_a?( Array ) -%>
|
|
|
|
<%- y.each do |a, b| -%>
|
2017-11-11 11:40:33 +00:00
|
|
|
<<%= x -%><%- if x == 'buffer' && !k['buffer_chunk_keys'].nil? -%> <%= k['buffer_chunk_keys'] -%><%- end -%>>
|
2017-08-04 09:16:31 +00:00
|
|
|
<%- if a.is_a?( Hash ) -%>
|
|
|
|
<%- a.each do |c, d| -%>
|
|
|
|
<%= c -%> <%= d %>
|
|
|
|
<%- end -%>
|
|
|
|
<%- else -%>
|
|
|
|
<%= a -%> <%= b %>
|
|
|
|
<%- end -%>
|
|
|
|
</<%= x %>>
|
|
|
|
<%- end -%>
|
|
|
|
<%- else -%>
|
2017-11-11 11:40:33 +00:00
|
|
|
<%- if x == 'buffer_chunk_keys'; next; end -%>
|
2017-08-04 09:16:31 +00:00
|
|
|
<%= x -%> <%= y %>
|
|
|
|
<%- end -%>
|
|
|
|
<%- end -%>
|
2015-12-01 13:19:18 +00:00
|
|
|
<%- else -%>
|
2017-08-04 09:16:31 +00:00
|
|
|
<%= k -%> <%= v %>
|
2015-12-01 13:19:18 +00:00
|
|
|
<%- end -%>
|
2017-08-04 09:16:31 +00:00
|
|
|
</<%= key %>>
|
|
|
|
<%- end -%>
|
|
|
|
<%- else -%>
|
|
|
|
<%= key -%> <%= val %>
|
|
|
|
<%- end -%>
|
2015-12-01 13:19:18 +00:00
|
|
|
<% end -%>
|
|
|
|
</match>
|