Skip to content

Commit 33954fc

Browse files
authored
Merge pull request #163 from code0-tech/162-genericmapperto_h-is-implemented-incorrectly
Fix ruby implementation
2 parents 270cfc1 + 8736b99 commit 33954fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build/ruby/lib/tucana/shared/shared.data_type.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,16 @@ def self.from_hash(config)
238238
def to_h
239239
{
240240
target: self.target,
241-
source: self.source.to_h,
241+
source: self.source.map(&:to_h),
242242
generic_combinations: self.generic_combinations.map(&:to_h),
243243
}
244244
end
245245

246246
def from_hash(config)
247247
self.target = config[:target]
248-
self.source = DataTypeIdentifier.from_hash(config.fetch(:source))
248+
self.source = config[:source].map do |source|
249+
DataTypeIdentifier.from_hash(source)
250+
end
249251
self.generic_combinations = config.fetch(:generic_combinations, [])
250252
self
251253
end

0 commit comments

Comments
 (0)