Sha256: ae71591db36bf398fe43c6aedd51957835d0576ff56a9001747b1a9f5048fb08
Contents?: true
Size: 1.02 KB
Versions: 48
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true module Dsu module Services module MigrationVersion class HydratorService 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 options.nil? raise ArgumentError, "options is the wrong object type:\"#{options}\"" unless options.is_a?(Hash) @migration_version_hash = migration_version_hash.dup @options = options || {} end def call hydrate end private attr_reader :migration_version_hash, :options def hydrate migration_version_hash[:version] = migration_version_hash[:version].to_i migration_version_hash end end end end end
Version data entries
48 entries across 48 versions & 1 rubygems