Class: Patriarch::DAOServices::RetrieverService
- Defined in:
- lib/patriarch/dao_services/retriever_service.rb
Overview
Services managing transactions must not know how the database layer is structured. We thus provide DAO through this RetrieverService and let them know about the interface of the DAOs
Instance Method Summary collapse
-
#call(transaction_item) ⇒ Hash
Only public method of this service, does the work of retrieving DAOs for a given transaction step.
Instance Method Details
#call(transaction_item) ⇒ Hash
Only public method of this service, does the work of retrieving DAOs for a given transaction step
13 14 15 16 17 18 19 20 21 |
# File 'lib/patriarch/dao_services/retriever_service.rb', line 13 def call(transaction_item) result = {} result[:actor] = instantiate_DAO_for_actor(transaction_item) result[:target] = instantiate_DAO_for_target(transaction_item) if transaction_item.tripartite? result[:medium] = instantiate_DAO_for_medium(transaction_item) end result end |