Sha256: 3e67a3cc32bb53539b238a7f7f8e14c05d56bc96b6c4cd5bb21fe61b4295a9dc

Contents?: true

Size: 870 Bytes

Versions: 1

Compression:

Stored size: 870 Bytes

Contents

require 'dmao_api'
require 'dmao/api/person'
require 'time'
require 'dmao/ingesters/generic/ingester'
require 'dmao/ingesters/errors/generic_ingester'
require 'dmao/ingesters/errors/empty_attributes'
require 'dmao/ingesters/errors/ingest_person_error'

module DMAO
  module Ingesters
    module Generic

      class PeopleIngester < Ingester

        ENTITY = DMAO::API::Person
        ENTITY_ERROR = DMAO::Ingesters::Errors::IngestPersonError
        INVALID_ENTITY_ERROR = DMAO::API::Errors::InvalidPerson
        ENTITY_ERROR_MESSAGE = "Invalid person details"

        def ingest_person attributes={}
          ingest_entity attributes
        end

        private

        def add_person attributes
          add_entity attributes
        end

        def update_person id, attributes
          update_entity id, attributes
        end

      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dmao-generic-ingesters-0.4.0 lib/dmao/ingesters/generic/people_ingester.rb