dao-rb/dao-gateway

View on GitHub
lib/dao/gateway/entity_processor.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Dao
  module Gateway
    class EntityProcessor < Processor
      def initialize(entity_class)
        @entity_class = entity_class
      end

      def process(attributes)
        @entity_class.new(attributes).tap do |entity|
          entity.initialized_with = @associations
        end
      end
    end
  end
end