Sha256: 03f9e4135e7aed3cebf41c6b3c444a4a8f94dbe09a4cc8547be21c2cf68eb3bf
Contents?: true
Size: 704 Bytes
Versions: 48
Compression:
Stored size: 704 Bytes
Contents
# frozen_string_literal: true require_relative '../../models/entry' module Dsu module Services module Entry class HydratorService def initialize(entries_array:, options: {}) raise ArgumentError, 'entries_array is nil' if entries_array.nil? raise ArgumentError, 'options is nil' if options.nil? @entries_array = entries_array @options = options || {} end def call hydrate end private attr_reader :entries_array, :options def hydrate entries_array.map do |entry_hash| Dsu::Models::Entry.new(**entry_hash) end end end end end end
Version data entries
48 entries across 48 versions & 1 rubygems