Skip to content

Commit

Permalink
Merge pull request #158 from SearchLightNZ/fix_client_attributes
Browse files Browse the repository at this point in the history
Fix client attributes so that hashes and arrays work correctly
  • Loading branch information
nward authored May 14, 2021
2 parents 28c34bc + 8176e4b commit 7a43a76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/client.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ client <%= @shortname %> {
}
<%- end -%>
<%- if defined?(@attributes) and [email protected]? -%>
<%- if defined?(@attributes).respond_to?('join') -%>
<%- if @attributes.respond_to?('join') -%>
<%= @attributes.join("\n ") %>
<%- elsif defined?(@attributes).is_a?(Hash) -%>
<%- elsif @attributes.is_a?(Hash) -%>
<%- @attributes.sort.each do |k, v| -%>
<%= k %> = <%= v %>
<%- end -%>
<%- elsif defined?(@attributes) -%>
<%- else -%>
<%= @attributes %>
<%- end -%>
<%- end -%>
Expand Down

0 comments on commit 7a43a76

Please sign in to comment.