Skip to content

Commit

Permalink
Fix restriction attributes collection
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzobrain committed Apr 20, 2024
1 parent 304ad10 commit 5844c28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xsd/objects/restriction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def collect_elements(include_base = false)
def collect_attributes(include_base = true)
result = super(include_base)
# Filter restricted attributes to avoid duplicates from restricting and restricted type
result.inject({}) { |hash, item| hash[item.name] = item; hash }.values if include_base
include_base ? result.inject({}) { |hash, item| hash[item.name] = item; hash }.values : result
end
end
end

0 comments on commit 5844c28

Please sign in to comment.