cookbooks/fb_smokeping/templates/target_hash.erb (11 lines of code) (raw):

<% @indent = 1 if not @indent %> <% ind = '+' * @indent %> <% @config.each do |key, val| %> <% if val.is_a?(Hash) %> <%= ind %> <%= key %> <%= render 'target_hash.erb', :variables => { :config => val, :indent => @indent + 1} -%> <% else %> <%= key %> = <%= val %> <% end %> <% end %>