Skip to content

Commit

Permalink
Cache namespace calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzobrain committed Apr 13, 2024
1 parent 9d42caa commit 8f6ef60
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/xsd/shared/named.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ module Named
# Get definition namespace
# @return String
def namespace
is_referenced = respond_to?(:referenced?)
is_referenced && referenced? ? reference.schema.target_namespace : schema.target_namespace
@namespace ||= (respond_to?(:referenced?) && referenced? ? reference.schema : schema).target_namespace
end

# Get absolute definition name
Expand Down

0 comments on commit 8f6ef60

Please sign in to comment.