Skip to content

Commit

Permalink
Fix setting of arrays for nested resources/types.
Browse files Browse the repository at this point in the history
  • Loading branch information
jawalonoski committed Apr 27, 2016
1 parent 475d9f5 commit 8ff80be
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/bootstrap/hashable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ def from_hash(hash)
klass = Module.const_get("FHIR::#{child['resourceType']}") rescue nil
end
begin
obj = klass.new
obj.from_hash(child)
obj = klass.new(child)
rescue Exception => e
$LOG.error("Unable to inflate embedded class #{klass}\n#{e.backtrace}")
end
Expand All @@ -66,8 +65,7 @@ def from_hash(hash)
klass = Module.const_get("FHIR::#{value['resourceType']}") rescue nil
end
begin
obj = klass.new
obj.from_hash(value)
obj = klass.new(value)
value = obj
rescue Exception => e
$LOG.error("Unable to inflate embedded class #{klass}\n#{e.backtrace}")
Expand Down

0 comments on commit 8ff80be

Please sign in to comment.