unless page_content.start_with?("---\n")
raise ArgumentError.new('content is not a proper YAML document')
end
- data = YAML.load(page_content)
+ yaml_content = /\A---\n(.*)\n---\n/m.match(page_content)[1]
+ data = YAML.load(yaml_content)
MEMBER_FIELDS.each do |field|
self[field] = data[field.to_s]
end