Skip to content

Commit

Permalink
support multiple values for one key
Browse files Browse the repository at this point in the history
  • Loading branch information
saz committed Feb 25, 2014
1 parent 1f87ad6 commit dd888e3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions templates/ssh_config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
<%- if v.is_a?(Hash) -%>
<%= k %>
<%- v.each do |key, value| -%>
<%- if value.is_a?(Array) -%>
<%- value.each do |a| -%>
<%= key %> <%= a %>
<%- end -%>
<%- else -%>
<%= key %> <%= value %>
<%- end -%>
<%- end -%>
<%- else -%>
<%- if v.is_a?(Array) -%>
<%- v.each do |a| -%>
<%= k %> <%= a %>
<%- end -%>
<%- else -%>
<%= k %> <%= v %>
<%- end -%>
<%- end -%>
<%- end -%>
12 changes: 12 additions & 0 deletions templates/sshd_config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@
<%- if v.is_a?(Hash) -%>
<%= k %>
<%- v.each do |key, value| -%>
<%- if value.is_a?(Array) -%>
<%- value.each do |a| -%>
<%= key %> <%= a %>
<%- end -%>
<%- else -%>
<%= key %> <%= value %>
<%- end -%>
<%- end -%>
<%- else -%>
<%- if v.is_a?(Array) -%>
<%- v.each do |a| -%>
<%= k %> <%= a %>
<%- end -%>
<%- else -%>
<%= k %> <%= v %>
<%- end -%>
<%- end -%>
<%- end -%>

0 comments on commit dd888e3

Please sign in to comment.