Class: Dsu::Services::EntryGroup::HydratorService
- Inherits:
-
Object
- Object
- Dsu::Services::EntryGroup::HydratorService
- Defined in:
- lib/dsu/services/entry_group/hydrator_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(entry_group_hash:, options: {}) ⇒ HydratorService
constructor
A new instance of HydratorService.
Constructor Details
#initialize(entry_group_hash:, options: {}) ⇒ HydratorService
Returns a new instance of HydratorService.
10 11 12 13 14 15 16 |
# File 'lib/dsu/services/entry_group/hydrator_service.rb', line 10 def initialize(entry_group_hash:, options: {}) raise ArgumentError, 'entry_group_hash is nil' if entry_group_hash.nil? raise ArgumentError, 'options is nil' if .nil? @entry_group_hash = entry_group_hash @options = || {} end |
Instance Method Details
#call ⇒ Object
18 19 20 |
# File 'lib/dsu/services/entry_group/hydrator_service.rb', line 18 def call Models::EntryGroup.new(**hydrate) end |