MEMBER_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
---
name: <%= name %>
-<% unless address.nil? %>
+<% unless address.nil? -%>
address: |
<%= address.gsub(/^/, ' ').rstrip %>
-<% end %>
+<% end -%>
email: <%= email %>
joined_on: <%= joined_on %>
membership_fee_paid_on: <%= membership_fee_paid_on %>
end
def render_member_file(locals)
- ERB.new(MEMBER_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
+ ERB.new(MEMBER_FILE_TEMPLATE, nil, '-').result(OpenStruct.new(locals).instance_eval { binding })
end
def new_id