require 'ostruct'
require 'yaml'
-BASE_SUBSCRIPTIONS = YAML.load(<<END_OF_YAML)
+BASE_MEMBERS = YAML.load(<<END_OF_YAML)
000001:
name: Matthieu Simon-Blavier
address: |
Et il n'est pas à jour de cotisation.
END_OF_YAML
-EXTRA_SUBSCRIPTION = YAML.load(<<END_OF_YAML)
+EXTRA_MEMBER = YAML.load(<<END_OF_YAML)
name: Franck Rohard
address: |
SOCIETE FRANCAISE DU RADIOTELEPHONE - SFR
Il vient de `whois sfr.fr`.
END_OF_YAML
-SUBSCRIPTION_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
+MEMBER_FILE_TEMPLATE = <<'END_OF_TEMPLATE'
---
name: <%= name %>
address: |
<%= notes %>
END_OF_TEMPLATE
-def subscription_filename_for_id(id)
+def member_filename_for_id(id)
"Membres/%06d.mdwn" % id
end
-def render_subscription_file(locals)
- ERB.new(SUBSCRIPTION_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
+def render_member_file(locals)
+ ERB.new(MEMBER_FILE_TEMPLATE).result(OpenStruct.new(locals).instance_eval { binding })
end
def new_id