lib/eco/api/common/people/entry_factory.rb in eco-helpers-2.7.14 vs lib/eco/api/common/people/entry_factory.rb in eco-helpers-2.7.15

- old
+ new

@@ -25,18 +25,18 @@ # @param person_parser [nil, Eco::API::Common::People::PersonParser] # set of attribute, type and format parsers/serializers. # @param attr_map [nil, Eco::Data::Mapper] attribute names mapper # to translate external names into internal ones and _vice versa_. def initialize(e, schema:, person_parser: nil, default_parser: nil, attr_map: nil) + super(e) msg = "Constructor needs a PersonSchema. Given: #{schema.class}" fatal msg unless schema.is_a?(Ecoportal::API::V1::PersonSchema) msg = "Expecting PersonParser. Given: #{person_parser.class}" fatal msg if person_parser && !person_parser.is_a?(Eco::API::Common::People::PersonParser) msg = "Expecting Mapper object. Given: #{attr_map.class}" fatal msg if attr_map && !attr_map.is_a?(Eco::Data::Mapper) - super(e) @schema = Ecoportal::API::V1::PersonSchema.new(JSON.parse(schema.doc.to_json)) @source_person_parser = person_parser # load default parser + custom parsers