lib/contentful_middleman/mappers/base.rb in contentful_middleman-1.0.4 vs lib/contentful_middleman/mappers/base.rb in contentful_middleman-1.1.0

- old
+ new

@@ -1,9 +1,15 @@ require_relative '../commands/context' module ContentfulMiddleman module Mapper class Base + attr_reader :entries + + def initialize(entries) + @entries = entries + end + def map(context, entry) context.id = entry.id entry.fields.each {|k, v| map_field context, k, v} end