We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Hash#has_key?
1 parent 0a975c0 commit 7a744aaCopy full SHA for 7a744aa
lib/json/ld/utils.rb
@@ -9,7 +9,7 @@ module Utils
9
# @return [Boolean]
10
def node?(value)
11
value.is_a?(Hash) &&
12
- (value.keys & %w(@value @list @set)).empty? &&
+ !(value.has_key?('@value') || value.has_key?('@list') || value.has_key?('@set')) &&
13
(value.length > 1 || !value.has_key?('@id'))
14
end
15
0 commit comments