Class: Dsu::Services::MigrationVersion::HydratorService
- Inherits:
-
Object
- Object
- Dsu::Services::MigrationVersion::HydratorService
- Defined in:
- lib/dsu/services/migration_version/hydrator_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(migration_version_hash:, options: {}) ⇒ HydratorService
constructor
A new instance of HydratorService.
Constructor Details
#initialize(migration_version_hash:, options: {}) ⇒ HydratorService
Returns a new instance of HydratorService.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dsu/services/migration_version/hydrator_service.rb', line 7 def initialize(migration_version_hash:, options: {}) raise ArgumentError, 'migration_version_hash is nil' if migration_version_hash.nil? unless migration_version_hash.is_a?(Hash) raise ArgumentError, "migration_version_hash is the wrong object type: \"#{migration_version_hash}\"" end raise ArgumentError, 'options is nil' if .nil? raise ArgumentError, "options is the wrong object type:\"#{options}\"" unless .is_a?(Hash) @migration_version_hash = migration_version_hash.dup = || {} end |
Instance Method Details
#call ⇒ Object
21 22 23 |
# File 'lib/dsu/services/migration_version/hydrator_service.rb', line 21 def call hydrate end |